| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | Make Expr::isConstantInitializer match IRGen. | Eli Friedman | 2013-07-16 | 1 | -0/+3 |
| | | | | | | | | | | | Sema needs to be able to accurately determine what will be emitted as a constant initializer and what will not, so we get accurate errors in C and accurate -Wglobal-constructors warnings in C++. This makes Expr::isConstantInitializer match CGExprConstant as closely as possible. llvm-svn: 186464 | ||||
| * | Move the test for PR13720 from Sema/init.c to Sema/thread-specifier.c. | Hans Wennborg | 2012-08-29 | 1 | -7/+0 |
| | | | | | | | Can't use __thread in init.c because it doesn't have a triple. llvm-svn: 162836 | ||||
| * | The address of a TLS var is not compile-time constant (PR13720) | Hans Wennborg | 2012-08-29 | 1 | -0/+7 |
| | | | | | | | | | | | | | This makes Clang produce an error for code such as: __thread int x; int *p = &x; The lvalue of a thread-local variable cannot be evaluated at compile time. llvm-svn: 162835 | ||||
| * | Switching to using dyn_cast_or_null, and fixing line endings in the test case. | Aaron Ballman | 2012-02-09 | 1 | -6/+6 |
| | | | | | llvm-svn: 150209 | ||||
| * | Attempting to initialize a union member that does not exist no longer crashes. | Aaron Ballman | 2012-02-09 | 1 | -3/+12 |
| | | | | | | | Patch by Remi Gacogne llvm-svn: 150144 | ||||
| * | CheckStringInit has side effects; make sure we don't run it in VerifyOnly ↵ | Eli Friedman | 2011-09-26 | 1 | -0/+4 |
| | | | | | | | | | mode, at least for the moment. <rdar://problem/10185490>. Sebastian, please take a look at this; I'm not entirely sure it is the right thing to do. llvm-svn: 140552 | ||||
| * | fix PR8217, a silent miscompilation of invalid code. | Chris Lattner | 2010-10-10 | 1 | -0/+1 |
| | | | | | llvm-svn: 116166 | ||||
| * | tests: Use -ffreestanding when including stdint.h, to avoid platform ↵ | Daniel Dunbar | 2010-09-07 | 1 | -1/+1 |
| | | | | | | | dependencies. llvm-svn: 113301 | ||||
| * | Vector types are not arithmetic types, either. Note that we now ban | Douglas Gregor | 2010-06-22 | 1 | -2/+0 |
| | | | | | | | | | | __real myvec and __imag myvec, since they aren't all that useful (it's just an identity function) but we might want to use them in more restricted cases in the future (e.g., "__real mycomplexvec" could extract the real parts of a vector of complex numbers). llvm-svn: 106601 | ||||
| * | Fix PR4386 by implementing gcc's old behaviour (4.2) when initializing | Rafael Espindola | 2010-05-07 | 1 | -0/+14 |
| | | | | | | | variables with a comparison of a function pointer with 0. llvm-svn: 103253 | ||||
| * | Fix PR6327: restore invariants when there's a parse error in an initializer. | John McCall | 2010-03-31 | 1 | -1/+2 |
| | | | | | llvm-svn: 99980 | ||||
| * | Initialization improvements: addition of string initialization and a few | Eli Friedman | 2009-12-19 | 1 | -1/+1 |
| | | | | | | | | | small bug fixes in SemaInit, switch over SemaDecl to use it more often, and change a bunch of diagnostics which are different with the new initialization code. llvm-svn: 91767 | ||||
| * | Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. | Daniel Dunbar | 2009-12-15 | 1 | -1/+1 |
| | | | | | | | | | | - 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 | ||||
| * | Fix for PR5447: teach Evaluate to deal with floating-point conditionals. | Eli Friedman | 2009-12-04 | 1 | -0/+4 |
| | | | | | llvm-svn: 90521 | ||||
| * | Reorganize the parsing of decl groups / function definitions so that | John McCall | 2009-11-03 | 1 | -1/+1 |
| | | | | | | | | declarators are parsed primarily within a single function (at least for these cases). Remove some excess diagnostics arising during parse failures. llvm-svn: 85924 | ||||
| * | Fix for PR4285: allow intializing a const wchar_t array with a wide | Eli Friedman | 2009-05-31 | 1 | -0/+4 |
| | | | | | | | string. llvm-svn: 72663 | ||||
| * | Explictly track tentative definitions within Sema, then hand those | Douglas Gregor | 2009-04-21 | 1 | -2/+1 |
| | | | | | | | | | | | | | | | | tentative definitions off to the ASTConsumer at the end of the translation unit. Eliminate CodeGen's internal tracking of tentative definitions, and instead hook into ASTConsumer::CompleteTentativeDefinition. Also, tweak the definition-deferal logic for C++, where there are no tentative definitions. Fixes <rdar://problem/6808352>, and will make it much easier for precompiled headers to cope with tentative definitions in the future. llvm-svn: 69681 | ||||
| * | hoist checks for ; and in out of ParseInitDeclaratorListAfterFirstDeclarator | Chris Lattner | 2009-03-29 | 1 | -1/+1 |
| | | | | | | | into ParseSimpleDeclaration, and improve a diagnostic. llvm-svn: 68009 | ||||
| * | Rename clang to clang-cc. | Daniel Dunbar | 2009-03-24 | 1 | -1/+1 |
| | | | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602 | ||||
| * | Fix PR3868 by making Evaluate handle cases like "(long)&a + 4". | Eli Friedman | 2009-03-24 | 1 | -0/+3 |
| | | | | | llvm-svn: 67593 | ||||
| * | Add type checking for tentative definitions at the end of the | Douglas Gregor | 2009-03-10 | 1 | -1/+2 |
| | | | | | | | | | | translation unit. Thread the various declarations of variables via VarDecl::getPreviousDeclaration. llvm-svn: 66601 | ||||
| * | A few small improvements to Evaluate for stuff I noted in FIXMEs. | Eli Friedman | 2009-02-23 | 1 | -0/+9 |
| | | | | | llvm-svn: 65305 | ||||
| * | Fix test to be legal on 64-bit systems. | Eli Friedman | 2009-02-22 | 1 | -1/+1 |
| | | | | | llvm-svn: 65270 | ||||
| * | Downgrade the "excess elements in initializer" errors to warnings *in | Douglas Gregor | 2009-02-18 | 1 | -0/+2 |
| | | | | | | | C*. They're required errors in C++. llvm-svn: 64964 | ||||
| * | Use our new snazzy stdint.h to make a testcase 64-bit portable. | Sebastian Redl | 2009-02-07 | 1 | -1/+3 |
| | | | | | llvm-svn: 63985 | ||||
| * | Add iterators to LookupResult, allowing one to iterate over the | Douglas Gregor | 2009-02-02 | 1 | -0/+10 |
| | | | | | | | | non-ambiguous name lookup results without allocating any memory, e.g., for sets of overloaded functions. llvm-svn: 63549 | ||||
| * | Closed out a few radars that were addressed by designated initializers | Douglas Gregor | 2009-01-30 | 1 | -0/+16 |
| | | | | | llvm-svn: 63398 | ||||
| * | Ignore parens when determining if an expr is a string literal. Fixes PR3382. | Anders Carlsson | 2009-01-24 | 1 | -0/+2 |
| | | | | | llvm-svn: 62922 | ||||
| * | Properly manage the bit-widths of APInts/APSInts in array initialization. | Douglas Gregor | 2009-01-23 | 1 | -1/+3 |
| | | | | | | | Fixes PR clang/3377 llvm-svn: 62851 | ||||
| * | Centralize error reporting of improper uses of incomplete types in the | Douglas Gregor | 2009-01-19 | 1 | -1/+2 |
| | | | | | | | | | | | new DiagnoseIncompleteType. It provides additional information about struct/class/union/enum types when possible, either by pointing to the forward declaration of that type or by pointing to the definition (if we're in the process of defining that type). Fixes <rdar://problem/6500531>. llvm-svn: 62521 | ||||
| * | Fix test cases broken by quote normalization in diagnostics. | Sebastian Redl | 2008-11-22 | 1 | -1/+1 |
| | | | | | llvm-svn: 59888 | ||||
| * | Fix PR3031 by silencing follow-on errors in invalid declarations. | Chris Lattner | 2008-11-11 | 1 | -1/+1 |
| | | | | | llvm-svn: 59027 | ||||
| * | Fix crash caused by this: | Argyrios Kyrtzidis | 2008-11-07 | 1 | -0/+1 |
| | | | | | | | | | void f() { int +; // crash here } llvm-svn: 58846 | ||||
| * | Fix PR3001: if we have an error parsing an initializer, make sure to remove | Chris Lattner | 2008-11-03 | 1 | -0/+7 |
| | | | | | | | | the designator corresponding to it, otherwise Sema and later parsing will get confused. llvm-svn: 58603 | ||||
| * | add the other test case for completeness and to avoid regressions in the future | Nuno Lopes | 2008-09-02 | 1 | -1/+2 |
| | | | | | llvm-svn: 55629 | ||||
| * | Fix for PR2747: allow pointer->int casts with a null base; these are | Eli Friedman | 2008-09-02 | 1 | -0/+8 |
| | | | | | | | offset-of-like expressions. llvm-svn: 55627 | ||||
| * | Add test case for function-pointer-cast-of-global as constant | Daniel Dunbar | 2008-08-25 | 1 | -0/+4 |
| | | | | | | | expression. llvm-svn: 55323 | ||||
| * | add testcase we already handle. | Chris Lattner | 2008-08-19 | 1 | -0/+4 |
| | | | | | llvm-svn: 54967 | ||||
| * | wrap some long diagnostics, make 'initializer is not a constant' diagnostic | Chris Lattner | 2008-08-10 | 1 | -1/+1 |
| | | | | | | | a bit more clear (rdar://5646070) llvm-svn: 54606 | ||||
| * | Make sure to allow assigning a pointer to a bool. | Eli Friedman | 2008-05-30 | 1 | -0/+8 |
| | | | | | llvm-svn: 51778 | ||||
| * | Fix a couple of bugs found by Neil Booth in the const-ness checking. | Eli Friedman | 2008-05-21 | 1 | -0/+12 |
| | | | | | llvm-svn: 51361 | ||||
| * | add testcase for pr2050 which is now fixed. | Chris Lattner | 2008-05-04 | 1 | -0/+13 |
| | | | | | llvm-svn: 50610 | ||||
| * | Improve diagnostic for illegal array initialization. | Eli Friedman | 2008-02-08 | 1 | -0/+4 |
| | | | | | llvm-svn: 46869 | ||||
| * | all filevar's have static storage. Previously a global with | Chris Lattner | 2007-12-02 | 1 | -0/+5 |
| | | | | | | | | extern storage class was returning false from hasStaticStorage. Ted, please review this. llvm-svn: 44515 | ||||
| * | add several cases that Expr::hasStaticStorage missed, pointed out by Oliver Hunt | Chris Lattner | 2007-11-27 | 1 | -0/+4 |
| | | | | | llvm-svn: 44376 | ||||
| * | Implement test/Sema/init.c by treating functions as constants. | Chris Lattner | 2007-11-01 | 1 | -0/+6 |
| llvm-svn: 43599 | |||||

