]> granicus.if.org Git - clang/commitdiff
Change the include stack of "instantiated from" notes to fall under the control of...
authorRichard Trieu <rtrieu@google.com>
Thu, 26 May 2011 20:49:16 +0000 (20:49 +0000)
committerRichard Trieu <rtrieu@google.com>
Thu, 26 May 2011 20:49:16 +0000 (20:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132143 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/TextDiagnosticPrinter.cpp
test/Misc/Inputs/include.h
test/Misc/include-stack-for-note-flag.cpp

index 0d048a30309d32f219784e22175ea631991edea3..1c47bf7bee93328eeb6ae0bb80797f209dc1f211 100644 (file)
@@ -343,7 +343,7 @@ void TextDiagnosticPrinter::EmitCaretDiagnostic(Diagnostic::Level Level,
       // "included from" lines.
       if (LastWarningLoc != PLoc.getIncludeLoc()) {
         LastWarningLoc = PLoc.getIncludeLoc();
-        PrintIncludeStack(Level, LastWarningLoc, SM);
+        PrintIncludeStack(Diagnostic::Note, LastWarningLoc, SM);
       }
 
       if (DiagOpts->ShowLocation) {
index d325775691de7391727786e170371b6d4fd3d39b..72835e90a551d1eca4418c055a74f8ea32e35f34 100644 (file)
@@ -1 +1,3 @@
+#define EQUALS(a,b) a == b
+
 int foo(int x) { return x; }
index f8d0080f57ac218cef4181bed6e8ef9d2fec67b5..328999ded0245e026980c09e4930115ea5f8b6e4 100644 (file)
@@ -9,10 +9,20 @@ int test() {
   return foo(1, 1);
 }
 
+bool macro(int x, int y) {
+  return EQUALS(&x, y);
+}
+
 // STACK: error: no matching function for call to 'foo'
 // STACK:  In file included from
 // STACK: note: candidate function not viable
+// STACK: error: comparison between pointer and integer
+// STACK:  In file included from
+// STACK: note: instantiated from:
 
 // STACKLESS: error: no matching function for call to 'foo'
 // STACKLESS-NOT:  In file included from
 // STACKLESS: note: candidate function not viable
+// STACKLESS: error: comparison between pointer and integer
+// STACKLESS-NOT:  In file included from
+// STACKLESS: note: instantiated from: