summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/FixItRewriter.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-01-06 23:44:25 +0000
committerDouglas Gregor <dgregor@apple.com>2010-01-06 23:44:25 +0000
commit10f1e4dda8a81defe476bc25b4d70bb1fdd345a6 (patch)
treec5f0c274910f3e7f789519f5952b328a247ebe4d /clang/lib/Frontend/FixItRewriter.cpp
parent2a43fd58ee98b7e411474fbc5c574981895cf641 (diff)
downloadbcm5719-llvm-10f1e4dda8a81defe476bc25b4d70bb1fdd345a6.tar.gz
bcm5719-llvm-10f1e4dda8a81defe476bc25b4d70bb1fdd345a6.zip
When suggesting a typo correction for an @implementation without a
corresponding @interface, provide a note showing which interface we're referring to. This note has the fix-it hint on it. Also, don't automatically apply fix-it hints for notes. They're meant to express fix-its that would change semantics. llvm-svn: 92870
Diffstat (limited to 'clang/lib/Frontend/FixItRewriter.cpp')
-rw-r--r--clang/lib/Frontend/FixItRewriter.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Frontend/FixItRewriter.cpp b/clang/lib/Frontend/FixItRewriter.cpp
index 4fa2b3c51eb..0b04cf2b44d 100644
--- a/clang/lib/Frontend/FixItRewriter.cpp
+++ b/clang/lib/Frontend/FixItRewriter.cpp
@@ -115,6 +115,9 @@ void FixItRewriter::HandleDiagnostic(Diagnostic::Level DiagLevel,
if (!AcceptableLocation)
return;
+ } else if (DiagLevel == Diagnostic::Note) {
+ // Don't apply fix-it modifications in notes.
+ return;
}
// Make sure that we can perform all of the modifications we
OpenPOWER on IntegriCloud