This revision was automatically updated to reflect the committed changes.
Szelethus marked 3 inline comments as done.
Closed by commit rL344870: [analyzer][NFC] Fix inconsistencies in
AnalyzerOptions (authored by Szelethus, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to
NoQ accepted this revision.
NoQ added a comment.
This revision is now accepted and ready to land.
Herald added a subscriber: dkrupp.
Thanks! Let's commit.
https://reviews.llvm.org/D53274
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http:/
Szelethus marked 2 inline comments as done.
Szelethus added inline comments.
Comment at: lib/StaticAnalyzer/Core/AnalyzerOptions.cpp:354
+StringRef AnalyzerOptions::getOptionAsString(Optional &V,
+ StringRef Name,
geo
george.karpenkov added a comment.
OK that makes sense to me, just let's be careful not to crash in places where
we weren't crashing before.
Comment at: lib/StaticAnalyzer/Core/AnalyzerOptions.cpp:354
+StringRef AnalyzerOptions::getOptionAsString(Optional &V,
+
Szelethus added a comment.
In https://reviews.llvm.org/D53274#1265625, @george.karpenkov wrote:
> I'm not sure why you could get away with removing those llvm_unreachable
> cases?
Because I got a warning for using `default` when every enum value was handled
in the switch. Since whether the fl
george.karpenkov added a comment.
I'm not sure why you could get away with removing those llvm_unreachable cases?
Comment at: lib/StaticAnalyzer/Core/AnalyzerOptions.cpp:373
- default:
-llvm_unreachable("Invalid mode.");
case UMK_Shallow:
Wh
george.karpenkov added a comment.
> The main motivation behind here is to emit warnings if an invalid
I'm totally with you here, but IIRC (@NoQ might want to correct me here),
the design decision was made specifically to ignore incorrect options, so that
e.g. old versions of Xcode used with old
Szelethus updated this revision to Diff 169703.
https://reviews.llvm.org/D53274
Files:
include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
lib/StaticAnalyzer/Core/CoreEngine.cpp
Index: lib/StaticAnalyzer/Core/CoreEngine.cpp
==