summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema
Commit message (Collapse)AuthorAgeFilesLines
* Create new EnumDecl nodes for redeclarations of enums, linking themDouglas Gregor2008-12-151-0/+6
| | | | | | | | | | together in the same way that we link RecordDecl/CXXRecordDecl nodes. Unify ActOnTag and ActOnTagStruct. Fixes PR clang/2753. llvm-svn: 61034
* Implement the final (hopefully) wrinkle to i-c-e + builtin_constant_p Chris Lattner2008-12-121-0/+13
| | | | | | | processing: it allows arbitrary foldable constants as the operand of ?: when builtin_constant_p is the condition. llvm-svn: 60954
* merge these testcases into one file.Chris Lattner2008-12-124-35/+35
| | | | llvm-svn: 60936
* implement rdar://6091492 - ?: with __builtin_constant_p as the operand is an ↵Chris Lattner2008-12-121-1/+6
| | | | | | i-c-e. llvm-svn: 60934
* add expected diagChris Lattner2008-12-121-1/+1
| | | | llvm-svn: 60927
* Fix rdar://6095061 - gcc allows __builtin_choose_expr as an lvalueChris Lattner2008-12-121-0/+7
| | | | llvm-svn: 60924
* Testcase for something that already works. Clang agrees with Comeau,Chris Lattner2008-12-121-0/+10
| | | | | | | and this makes sense. likely a gcc bug that it doesn't diagnose the bad restrict. llvm-svn: 60923
* fix rdar://6097892 - gcc incompat: clang rejects __func__, __FUNCTION__, and ↵Chris Lattner2008-12-121-1/+8
| | | | | | | | __PRETTY_FUNCTION__ outside func Yeah, this is "useful". llvm-svn: 60921
* Implement rdar://6138816 - [sema] named bitfields cannot have 0 widthChris Lattner2008-12-121-0/+3
| | | | llvm-svn: 60920
* add annotationChris Lattner2008-12-111-0/+3
| | | | llvm-svn: 60907
* Add another complex promotion test.Anders Carlsson2008-12-101-0/+4
| | | | llvm-svn: 60863
* Make sure to promote expressions of the form (floating point + complex ↵Anders Carlsson2008-12-101-0/+11
| | | | | | integer) correctly, to (complex floating point + complex floating point) llvm-svn: 60862
* Fix <rdar://problem/6418623> Bogus block type compatibility warning.Steve Naroff2008-12-101-1/+1
| | | | llvm-svn: 60842
* Workaround for PR3173. The fix is correct in the sense that if the enum Eli Friedman2008-12-081-0/+3
| | | | | | | | | code were working correctly, it would be a no-op, but it's not really a proper fix. That said, I don't really want to touch the enum code at the moment because I don't understand it very well, and this seems to be a relatively visible regression. llvm-svn: 60680
* a minor grammar fixChris Lattner2008-12-073-5/+5
| | | | llvm-svn: 60646
* Improve VLA diagnostics/sema checking. Fixes PR2361 and PR2352.Anders Carlsson2008-12-073-2/+27
| | | | llvm-svn: 60638
* Simplify test.Anders Carlsson2008-12-061-3/+4
| | | | llvm-svn: 60631
* Add diagnostics for bitfields.Anders Carlsson2008-12-061-0/+8
| | | | llvm-svn: 60628
* Use VerifyIntegerConstantExpression instead of isIntegerConstantExpr. Fixes ↵Anders Carlsson2008-12-051-0/+17
| | | | | | PR2963 llvm-svn: 60591
* Make Sema::CheckForConstantInitializer use Expr::Evaluate. This fixes PR3130.Anders Carlsson2008-12-051-1/+2
| | | | llvm-svn: 60580
* change getCurFunctionDecl to skip through Block contexts to findChris Lattner2008-12-041-0/+7
| | | | | | | | the containing block. Introduce a new getCurFunctionOrMethodDecl method to check to see if we're in a function or objc method. Minor cleanups to other related places. This fixes rdar://6405429. llvm-svn: 60564
* instead of forcing blocks on by default, make them default to off, but letChris Lattner2008-12-048-8/+8
| | | | | | | | specific targets default them to on. Default blocks to on on 10.6 and later. Add a -fblocks option that allows the user to override the target's default. Use -fblocks in the various testcases that use blocks. llvm-svn: 60563
* int-arith-convert.c makes assumptions about integer sizes, so force a ↵Sebastian Redl2008-12-021-1/+1
| | | | | | specific architecture llvm-svn: 60420
* Fix test. (0 && (a(),1)) is a valid I-C-E according to C99.Anders Carlsson2008-12-011-2/+2
| | | | llvm-svn: 60331
* Add Sema::isNullPointerConstant which extwarns if necessary. Use it in ↵Anders Carlsson2008-12-011-2/+2
| | | | | | Sema::CheckConditionalOperands. llvm-svn: 60319
* Use VerifyIntegerConstantExpression for case values.Anders Carlsson2008-12-012-6/+6
| | | | llvm-svn: 60317
* add missing RUN linesNuno Lopes2008-11-261-0/+2
| | | | llvm-svn: 60107
* Change a whole lot of diagnostics to take QualType's directly Chris Lattner2008-11-243-4/+4
| | | | | | | | instead of converting them to strings first. This also fixes a bunch of minor inconsistencies in the diagnostics emitted by clang and adds a bunch of FIXME's to DiagnosticKinds.def. llvm-svn: 59948
* The address of a variable is only constant if the variable has global storage.Anders Carlsson2008-11-241-0/+6
| | | | llvm-svn: 59939
* Fix bug in the constant evaluator. Fixes PR3115.Anders Carlsson2008-11-241-0/+3
| | | | llvm-svn: 59938
* Rewrite FindDiagnostics to be more strict about the formatting of the Chris Lattner2008-11-242-3/+3
| | | | | | | expected-foo strings. Now the only allowed characters between expected-error and {{ is whitespace. llvm-svn: 59925
* clean up -verify mode output. If the expected-error string is Chris Lattner2008-11-231-1/+1
| | | | | | mangled, report it using the diagnostics machinery instead of printf. llvm-svn: 59924
* make the 'to match this' diagnostic a note.Chris Lattner2008-11-231-1/+1
| | | | llvm-svn: 59921
* Make all the 'redefinition' diagnostics more consistent, and make the Chris Lattner2008-11-2312-43/+41
| | | | | | "previously defined here" diagnostics all notes. llvm-svn: 59920
* Fix test cases broken by quote normalization in diagnostics.Sebastian Redl2008-11-221-1/+1
| | | | llvm-svn: 59888
* Case values must be evaluatedAnders Carlsson2008-11-221-0/+10
| | | | llvm-svn: 59884
* Use Expr::Evaluate for case statements. Fixes PR2525Anders Carlsson2008-11-221-0/+22
| | | | llvm-svn: 59881
* add a silly testcaseChris Lattner2008-11-221-0/+5
| | | | llvm-svn: 59877
* merge some simple call diagnostics.Chris Lattner2008-11-211-1/+1
| | | | llvm-svn: 59831
* print a type in a diagnostic.Chris Lattner2008-11-211-0/+4
| | | | llvm-svn: 59829
* remove expected-error from #if 0 section of code.Chris Lattner2008-11-211-2/+2
| | | | llvm-svn: 59772
* disable expected-errors in #if parts of the test.Chris Lattner2008-11-211-3/+3
| | | | llvm-svn: 59771
* Switch several more Sema Diag methods over. This simplifies theChris Lattner2008-11-191-2/+2
| | | | | | | | __builtin_prefetch code to only emit one diagnostic per builtin_prefetch. While this has nothing to do with the rest of the patch, the code seemed like overkill when I was updating it. llvm-svn: 59588
* Implement rdar://6319320: give a good diagnostic for cases where peopleChris Lattner2008-11-172-1/+6
| | | | | | | are trying to use the old GCC "casts as lvalue" extension. We don't and will hopefully never support this. llvm-svn: 59460
* Fix PR3075, __builtin_stdarg_start being misprototyped. This affects netbsd ↵Chris Lattner2008-11-161-0/+9
| | | | | | headers. llvm-svn: 59419
* Fix for crash issues with comma operators with a void first operand, and Eli Friedman2008-11-131-0/+6
| | | | | | | | | | some more bullet-proofing/enhancements for tryEvaluate. This shouldn't cause any behavior changes except for handling cases where we were crashing before and being able to evaluate a few more cases in tryEvaluate. This should settle the minor mess surrounding r59196. llvm-svn: 59224
* Backout of r59196, plus a new ICE test. Sorry if this is a Eli Friedman2008-11-132-2/+3
| | | | | | | | | | | | | | | | | | little rude; I figure it's cleaner to just back this out now so it doesn't get forgotten or mixed up with other checkins. The modification to isICE is simply wrong; I've added a test that the change to isICE breaks. I'm pretty sure the modification to tryEvaluate is also wrong. At the very least, there's some serious miscommunication going on here, as this is going in exactly the opposite direction of r59105. My understanding is that tryEvaluate is not supposed to care about side effects. That said, a lot of the clients to tryEvaluate are expecting it to enforce a no-side-effects policy, so we probably need another method that provides that guarantee. llvm-svn: 59212
* Fix bug in constant evaluation exposed by 176.gcc.Daniel Dunbar2008-11-131-0/+2
| | | | | | | | | | | | - Evaluation of , operator used bogus assumption that LHS could be evaluated as an integral expression even though its type is unspecified. This change is making isICE very permissive of the LHS in non-evaluated contexts because it is not clear what predicate we would use to reject code here. The standard didn't offer me any guidance; opinions? llvm-svn: 59196
* Fix a FIXME by improving a diagnostic, add a testcase for PR3048Chris Lattner2008-11-121-0/+3
| | | | llvm-svn: 59167
* 64-bit test fixes.Sebastian Redl2008-11-122-6/+6
| | | | llvm-svn: 59165
OpenPOWER on IntegriCloud