Commit Graph

10 Commits

Author SHA1 Message Date
John McCall 85f9055955 When pretty-printing tag types, only print the tag if we're in C (and
therefore not creating ElaboratedTypes, which are still pretty-printed
with the written tag).

Most of these testcase changes were done by script, so don't feel too
sorry for my fingers.

llvm-svn: 98149
2010-03-10 11:27:22 +00:00
Chandler Carruth 585fb1e97e Fix support for const_cast<>s of array types which actual change the
CV-qualifiers. Remove an error expectation from the 'good' set of const-cast
test cases. With this patch, the final non-template test case from PR5542
passes. (It's the same as the one already in const-cast.cpp.)

llvm-svn: 92257
2009-12-29 08:05:19 +00:00
Daniel Dunbar 8fbe78f6fc Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- This is designed to make it obvious that %clang_cc1 is a "test variable"
   which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
   can be useful to redefine what gets run as 'clang -cc1' (for example, to set
   a default target).

llvm-svn: 91446
2009-12-15 20:14:24 +00:00
Argyrios Kyrtzidis b1d51aa18a Use "()" instead of "(void)" when pretty-printing a parameter-less function type for C++.
llvm-svn: 72747
2009-06-03 02:06:50 +00:00
Daniel Dunbar a45cf5b6b0 Rename clang to clang-cc.
Tests and drivers updated, still need to shuffle dirs.

llvm-svn: 67602
2009-03-24 02:24:46 +00:00
Chris Lattner 810d330cd3 Fix a long standard problem with clang retaining "too much" sugar
information about types.  We often print diagnostics where we say 
"foo_t" is bad, but the user doesn't know how foo_t is declared 
(because it is a typedef).  Fix this by expanding sugar when present
in a diagnostic (and not one of a few special cases, like vectors).

Before:
t.m:5:2: error: invalid operands to binary expression ('typeof(P)' and 'typeof(F)')
 MAX(P, F);
 ^~~~~~~~~
t.m:1:78: note: instantiated from:
#define MAX(A,B)    ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; })
                                                                             ^

After:
t.m:5:2: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float'))
 MAX(P, F);
 ^~~~~~~~~
t.m:1:78: note: instantiated from:
#define MAX(A,B)    ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; })
                                                                             ^

llvm-svn: 65081
2009-02-19 23:45:49 +00:00
Sebastian Redl b44ab5f25d Add support for member pointers to const_cast.
llvm-svn: 63055
2009-01-26 22:19:12 +00:00
Douglas Gregor ec8806e8ec Removed the warning
warning: statement was disambiguated as declaration

because it is currently firing in cases where the declaration would
not actually parse as a statement. We'd love to bring this warning
back if we can make it more accurate.

llvm-svn: 61137
2008-12-17 16:19:15 +00:00
Sebastian Redl 5c0098271b Remove workaround for reference. No longer necessary.
llvm-svn: 58395
2008-10-29 19:45:21 +00:00
Douglas Gregor 08d918a6c3 Semantic analysis for C++ reinterpret_cast and const_cast. Patch by Sebastian Redl.
llvm-svn: 58094
2008-10-24 15:36:09 +00:00