[cfe-commits] r111084 - /cfe/trunk/lib/Rewrite/FixItRewriter.cpp
Nick Lewycky
nicholas at mxc.ca
Sat Aug 14 16:03:19 PDT 2010
Author: nicholas
Date: Sat Aug 14 18:03:19 2010
New Revision: 111084
URL: http://llvm.org/viewvc/llvm-project?rev=111084&view=rev
Log:
Remember that FixItOptions* is optional and don't crash when it's not provided.
Modified:
cfe/trunk/lib/Rewrite/FixItRewriter.cpp
Modified: cfe/trunk/lib/Rewrite/FixItRewriter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Rewrite/FixItRewriter.cpp?rev=111084&r1=111083&r2=111084&view=diff
==============================================================================
--- cfe/trunk/lib/Rewrite/FixItRewriter.cpp (original)
+++ cfe/trunk/lib/Rewrite/FixItRewriter.cpp Sat Aug 14 18:03:19 2010
@@ -49,7 +49,7 @@
}
bool FixItRewriter::WriteFixedFiles() {
- if (NumFailures > 0 && !FixItOpts->FixWhatYouCan) {
+ if (NumFailures > 0 && (!FixItOpts || !FixItOpts->FixWhatYouCan)) {
Diag(FullSourceLoc(), diag::warn_fixit_no_changes);
return true;
}
More information about the cfe-commits
mailing list