aboutsummaryrefslogtreecommitdiff
path: root/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
commita6f26387355c9a9e61a33c480e28f1a9a15f9b62 (patch)
tree673a48aea49ba663bcf3f27fbe2037a10ebd701b /lib/Frontend/FixItRewriter.cpp
parentd8210650ed948de65a08a8daf16d291b747717c4 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92870 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/FixItRewriter.cpp')
-rw-r--r--lib/Frontend/FixItRewriter.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Frontend/FixItRewriter.cpp b/lib/Frontend/FixItRewriter.cpp
index 4fa2b3c51e..0b04cf2b44 100644
--- a/lib/Frontend/FixItRewriter.cpp
+++ b/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