diff --git a/src/clangsa/GCChecker.cpp b/src/clangsa/GCChecker.cpp index 8aa0ef009f4eb..a88a9ee3ed73c 100644 --- a/src/clangsa/GCChecker.cpp +++ b/src/clangsa/GCChecker.cpp @@ -941,7 +941,7 @@ bool GCChecker::processPotentialSafepoint(const CallEvent &Call, isGCTrackedType(ParmType->getPointeeType())) { // This is probably an out parameter. Find the value it refers to now. SVal Loaded = - State->getSVal(Call.getArgSVal(i).getAs().getValue()); + State->getSVal(*(Call.getArgSVal(i).getAs())); SpeciallyRootedSymbol = Loaded.getAsSymbol(); continue; } @@ -1520,7 +1520,7 @@ bool GCChecker::evalCall(const CallEvent &Call, CheckerContext &C) const { } } if (FD) { - Loc ItemsLoc = State->getLValue(FD, ArrayList).getAs().getValue(); + Loc ItemsLoc = *(State->getLValue(FD, ArrayList).getAs()); SVal Items = State->getSVal(ItemsLoc); if (Items.isUnknown()) { Items = C.getSValBuilder().conjureSymbolVal( @@ -1688,7 +1688,7 @@ void GCChecker::checkLocation(SVal SLoc, bool IsLoad, const Stmt *S, // better than this. if (IsLoad && (RS = State->get(SLoc.getAsRegion()))) { SymbolRef LoadedSym = - State->getSVal(SLoc.getAs().getValue()).getAsSymbol(); + State->getSVal(*SLoc.getAs()).getAsSymbol(); if (LoadedSym) { const ValueState *ValS = State->get(LoadedSym); if (!ValS || !ValS->isRooted() || ValS->RootDepth > RS->RootedAtDepth) { diff --git a/src/pipeline.cpp b/src/pipeline.cpp index 909f4e702360e..b40d4278b1e48 100644 --- a/src/pipeline.cpp +++ b/src/pipeline.cpp @@ -157,10 +157,16 @@ namespace { // Opts.UseAfterScope = CodeGenOpts.SanitizeAddressUseAfterScope; // Opts.UseAfterReturn = CodeGenOpts.getSanitizeAddressUseAfterReturn(); // MPM.addPass(RequireAnalysisPass()); + //Let's assume the defaults are actually fine for our purposes + #if JL_LLVM_VERSION < 160000 // MPM.addPass(ModuleAddressSanitizerPass( // Opts, UseGlobalGC, UseOdrIndicator, DestructorKind)); - //Let's assume the defaults are actually fine for our purposes MPM.addPass(ModuleAddressSanitizerPass(AddressSanitizerOptions())); + #else // LLVM 16+ + // MPM.addPass(AddressSanitizerPass( + // Opts, UseGlobalGC, UseOdrIndicator, DestructorKind)); + MPM.addPass(AddressSanitizerPass(AddressSanitizerOptions())); + #endif // } }; ASanPass(/*SanitizerKind::Address, */false);