[cfe-commits] Patch: Add flags to print or omit the include stacks of notes.

Richard Trieu rtrieu at google.com
Wed Mar 16 18:58:21 PDT 2011


This patch adds flags to print or omit the include stacks of notes.  These
stacks are less helpful in notes than those in errors and warnings.  Below
is the current output on an error, and how it will show up when the include
stack is disabled.

Current behavior:

test/test.cpp:9:10: error: no matching function for
      call to 'foo'
  return foo(1, 1);
         ^~~
In file included from test/test.cpp:7:
In file included from test/include7.h:1:
In file included from test/include6.h:1:
In file included from test/include5.h:1:
In file included from test/include4.h:1:
In file included from test/include3.h:1:
In file included from test/include2.h:1:
include1.h:1:5: note: candidate function not viable: requires 1
      argument, but 2 were provided
int foo(int x) { return x; }


With new flag to omit note include stacks:

test/test.cpp:9:10: error: no matching function for
      call to 'foo'
  return foo(1, 1);
         ^~~
include1.h:1:5: note: candidate function not viable: requires 1
      argument, but 2 were provided
int foo(int x) { return x; }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110316/77785549/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: include_stack_suppression.patch
Type: text/x-patch
Size: 11571 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110316/77785549/attachment.bin>


More information about the cfe-commits mailing list