- Apr 18, 2009
-
-
Chris Lattner authored
llvm-svn: 69424
-
Chris Lattner authored
1. We had logic in sema to decide whether or not to emit the error based on manually checking whether in a system header file. 2. we were allowing redefinitions of typedefs in class scope in C++ if in header file. 3. there was no way to force typedef redefinitions to be accepted by the C compiler, which annoys me when stripping linemarkers out of .i files. The fix is to split the C++ class typedef redefinition path from the C path, and change the C path to be a warning that normally maps to error. This causes it to properly be ignored in system headers, etc. and gives us a way to control it. Passing -Wtypedef-redefinition now turns the error into a warning. One behavior change is that we now diagnose cases where you redefine a typedef in your .c file that was defined in a header file. This seems like reasonable behavior, and the diagnostic now indicates that it can be controlled with -Wtypedef-redefinition. llvm-svn: 69391
-
- Apr 17, 2009
-
-
Chris Lattner authored
a dummy *function* type when it is recovering and knows it needs a function. rdar://6802350 - clang crash on invalid input llvm-svn: 69374
-
Chris Lattner authored
llvm-svn: 69366
-
Mike Stump authored
expressions that can be of static duration to be returned. Radar 6786551 llvm-svn: 69331
-
- Apr 16, 2009
-
-
rdar://problem/6765383Steve Naroff authored
Fix <rdar://problem/6765383> clang-6: clang does not appear to support declaring a static Block 'const'. llvm-svn: 69306
-
- Apr 15, 2009
-
-
Daniel Dunbar authored
- Also, fixed one to actually be one (instead of zero). :) llvm-svn: 69226
-
rdar://problem/6786597Steve Naroff authored
Teach Sema::SemaBuiltinVAStart() about blocks. llvm-svn: 69201
-
Steve Naroff authored
llvm-svn: 69178
-
rdar://problem/6789707Steve Naroff authored
Fix <rdar://problem/6789707> "warning: 'extern' variable has an initializer" not correct for __private_extern__. llvm-svn: 69167
-
Douglas Gregor authored
anonymous structs or unions. Fixes PR3778. llvm-svn: 69153
-
Daniel Dunbar authored
- Strip off extra parens when looking for casts. - Change the location info to point at the cast (instead of the assignment). For example, on int *b; #define a ((void*) b) void f0() { a = 10; } we now emit: /tmp/t.c:4:3: error: assignment to cast is illegal, lvalue casts are not supported a = 10; ^ ~ /tmp/t.c:2:12: note: instantiated from: #define a ((void*) b) ~^~~~~~~~~~ instead of: /tmp/t.c:4:5: error: expression is not assignable a = 10; ~ ^ llvm-svn: 69114
-
Daniel Dunbar authored
extension. llvm-svn: 69100
-
- Apr 14, 2009
-
-
Chris Lattner authored
int in a bitfield. Shantonu found this in a gcc testsuite file. llvm-svn: 69074
-
Chris Lattner authored
llvm-svn: 69051
-
Daniel Dunbar authored
- Exposed quite a few Sema issues and a CodeGen crash. - See FIXMEs in test case, and in SemaDecl.cpp (PR3983). I'm skeptical that __private_extern__ should actually be a storage class value. I think that __private_extern__ basically amounts to extern A __attribute__((visibility("hidden"))) and would be better off handled (a) as that, or (b) with an extra bit in the VarDecl. llvm-svn: 69020
-
- Apr 13, 2009
-
-
Eli Friedman authored
Northover. llvm-svn: 68991
-
-
- Apr 12, 2009
-
-
Chris Lattner authored
if a decl is invalid, it isn't added to the Decls array, so we need to pass in Decls.size() to avoid reading uninit memory. llvm-svn: 68913
-
- Apr 11, 2009
-
-
Chris Lattner authored
llvm-svn: 68864
-
- Apr 08, 2009
-
-
Steve Naroff authored
Fixes <rdar://problem/6762239> [sema] gcc incompatibility; error on incompatible operand types in ?:. llvm-svn: 68617
-
Douglas Gregor authored
Fixes <rdar://problem/6759522> llvm-svn: 68611
-
- Apr 07, 2009
-
-
Daniel Dunbar authored
clang. - We will eventually want some more driver infrastructre for this probably. - For now, the clang-cc interface stays relatively the same, but we don't accept multiple instances anymore, or the [no-] variants directly. llvm-svn: 68550
-
Eli Friedman authored
functions. Fixes PR3941. llvm-svn: 68541
-
- Apr 06, 2009
-
-
Chris Lattner authored
a really really bad idea. Now that we emit an error about the unpromoted type, users should be able to understand what is going on. llvm-svn: 68447
-
- Apr 05, 2009
-
-
Chris Lattner authored
diagnostic use the va_list typedef more often, see the difference in the changed testcase. llvm-svn: 68441
-
Chris Lattner authored
llvm-svn: 68435
-
Chris Lattner authored
va_lists for some reason. This fixes rdar://6726818 llvm-svn: 68434
-
- Apr 02, 2009
-
-
Douglas Gregor authored
llvm-svn: 68325
-
Douglas Gregor authored
definition, warn if there are too many/too few function call arguments. llvm-svn: 68318
-
Douglas Gregor authored
llvm-svn: 68289
-
Douglas Gregor authored
llvm-svn: 68279
-
Douglas Gregor authored
llvm-svn: 68268
-
Mike Stump authored
llvm-svn: 68263
-
Douglas Gregor authored
llvm-svn: 68261
-
Douglas Gregor authored
Plus, reword a extension warnings to avoid talking about "ISO C" when the extension might also be available in C++ or C++0x. llvm-svn: 68257
-
- Apr 01, 2009
-
-
Daniel Dunbar authored
llvm-svn: 68223
-
Douglas Gregor authored
llvm-svn: 68212
-
Ted Kremenek authored
real-world header files and these tests have caught serious bugs in the past. llvm-svn: 68204
-
Daniel Dunbar authored
- <rdar://problem/6741594> [pth] don't abuse -x to drive pth generation - Simpler, and fixes PR3915. Cleanup test cases for PTH: - Update to use -emit-pth - Removed PTH test of carbon.c and cocoa.mm; these didn't actually verify anything, and since PTH is token based the extra coverage (over cocoa.m) isn't particularly helpful. - Split PTH tests in cocoa.m to cocoa-pth.m, solely to increase available parallelism when running tests. Ted, could you update the PTH test cases (include-pth.c and cocoa-pth.m) to have some sort of positive check that the PTH is getting used? "# of PTH cache hits" or "tokens read from PTH cache" statistics would work great. :) llvm-svn: 68189
-