summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Rename test.Anders Carlsson2011-04-131-0/+0
| | | | llvm-svn: 129486
* Add -no-canonical-prefixes to tests which assert on the name of theChandler Carruth2011-04-132-2/+2
| | | | | | | built clang binary that is used by the test. Build systems that use symlinks for build outputs will fail these assertions otherwise. llvm-svn: 129482
* Issue the 2nd fixit even if fix-it hint is supressed.Fariborz Jahanian2011-04-131-1/+2
| | | | | | // rdar://9091893 llvm-svn: 129481
* No fixit hint for builtin expressions which areFariborz Jahanian2011-04-131-0/+15
| | | | | | defined in a macro. // rdar://9091893 llvm-svn: 129465
* Removing the unaligned load tests from builtins-x86.c since they're ↵Bill Wendling2011-04-131-2/+0
| | | | | | generated by a regular 'load' now. llvm-svn: 129464
* Teach -Wuninitialized about C++'s typeid expression, including both theChandler Carruth2011-04-131-0/+17
| | | | | | | | | | | evaluated and unevaluated contexts. Add some testing of sizeof and typeid. Both of the typeid tests added here were triggering warnings previously. Now the one false positive is suppressed without suppressing the warning on actually buggy code. llvm-svn: 129431
* In Microsoft mode, within class scope, if a CXXScopeSpec's type is equal to ↵Francois Pichet2011-04-131-0/+32
| | | | | | | | | | | | | | | | | | the type of one of the base classes then downgrade the missing typename error to a warning. Up to now this is the only case I found where MSVC doesn't require "typename" at class scope. Really strange! This fixes 1 error when parsing the MSVC 2008 header files. Example: template<class T> class A { public: typedef int TYPE; }; template<class T> class B : public A<T> { public: A<T>::TYPE a; // no typename required because A<T> is a base class. }; llvm-svn: 129425
* Redeclaration of 'self' should be flagged inFariborz Jahanian2011-04-121-0/+18
| | | | | | | objective-c instead of crashing in IRgen. // rdar://9154582. llvm-svn: 129412
* IRgen/Obj-C: Emit CFStrings and NSStrings with the alignment of the char type,Daniel Dunbar2011-04-121-2/+14
| | | | | | | | | | there is no reason to align them higher. - This roughly matches llvm-gcc's r126913. - It is an open question whether or not we should do this for cstring's in general (code size vs optimization potential), for now we just match llvm-gcc until someone wants to run some experiments. llvm-svn: 129410
* We can't emit an aggregate cast as its sub-expression in general justJohn McCall2011-04-121-1/+7
| | | | | | | | | because the result is ignored. The particular example here is with property l-values, but there could be all sorts of lovely casts that this isn't safe for. Sink the check into the one case that seems to actually be capable of honoring this. llvm-svn: 129397
* Teach VariadicMethodTypeChecker to not crash when processing methods ↵Ted Kremenek2011-04-121-0/+9
| | | | | | declared in protocols. llvm-svn: 129395
* ArrayBoundCheckerV2: don't arbitrarily warn about indexing before the ↵Ted Kremenek2011-04-121-0/+9
| | | | | | 0-index of a symbolic region. In many cases that isn't really the base offset. llvm-svn: 129366
* This patch adds modeling of strcmp() to the CString checker. Validates ↵Lenny Maiorani2011-04-121-0/+86
| | | | | | inputs are not NULL and are real C strings, then does the comparison and binds the proper return value. Unit tests included. llvm-svn: 129364
* Fix a regression where the initializer implementsFariborz Jahanian2011-04-121-0/+41
| | | | | | | the initialized's protocol and yet clang warns. objective-c issue, // rdar://9267196 llvm-svn: 129363
* Fix AST serialization of reference-to-reference types. This previously causedRichard Smith2011-04-122-0/+19
| | | | | | | | | a crash when deserializing the AST for this: typedef char (&R); extern R &r; llvm-svn: 129358
* static analyzer: invalidate by-ref arguments passed to constructors in a ↵Ted Kremenek2011-04-121-0/+16
| | | | | | 'new' expression. llvm-svn: 129349
* Fix bug in SimpleSValBuilder where '--' pointer arithmetic was treated like ↵Ted Kremenek2011-04-121-0/+19
| | | | | | '++' pointer arithmetic. llvm-svn: 129348
* Don't suggest dynamic_cast or typeid as code completion results whenDouglas Gregor2011-04-121-2/+56
| | | | | | | | RTTI is disabled. Similarly, don't suggest throw or try as code completion results when C++ exceptions are disabled. Fixes <rdar://problem/9193560>. llvm-svn: 129346
* Template static data members can have weak_odr linkage, not justJohn McCall2011-04-127-12/+22
| | | | | | | | weak linkage. Also, fix a problem where global weak variables with non-trivial initializers were getting guard variables, or at least were checking for them and then crashing. llvm-svn: 129342
* Whoops.John McCall2011-04-121-1/+1
| | | | llvm-svn: 129341
* Objective-C++: The global namespace is an associated namespace of anDouglas Gregor2011-04-121-0/+19
| | | | | | Objective-C pointer type. Fixes <rdar://problem/9142559>. llvm-svn: 129339
* Ignore indirect field declarations. Fixes PR9570.John McCall2011-04-121-0/+7
| | | | llvm-svn: 129337
* Formatting.John McCall2011-04-121-11/+8
| | | | llvm-svn: 129336
* This test works now; enable it.John McCall2011-04-121-18/+16
| | | | llvm-svn: 129335
* RegionStoreManager::invalidateRegions: treat classes the same as structs.Ted Kremenek2011-04-121-0/+14
| | | | llvm-svn: 129333
* After some discussion with Doug, we decided that it made a lot more senseJohn McCall2011-04-122-20/+51
| | | | | | | | | for __unknown_anytype resolution to destructively modify the AST. So that's what it does now, which significantly simplifies some of the implementation. Normal member calls work pretty cleanly now, and I added support for propagating unknown-ness through &. llvm-svn: 129331
* Teach GRState::getSValAsScalarOrLoc() about C++ references.Ted Kremenek2011-04-121-0/+10
| | | | llvm-svn: 129329
* C++ static analysis: also invalidate fields of objects that are the callees ↵Ted Kremenek2011-04-111-0/+33
| | | | | | in C++ method calls. llvm-svn: 129308
* Fixup more objc rwriter bug having to do withFariborz Jahanian2011-04-111-3/+8
| | | | | | | rewriting of blocks which have objective-c stuff which need be rewritten as well. // rdar://9254348 llvm-svn: 129300
* If there's an invoke destination, we should use invoke instead of call when ↵Anders Carlsson2011-04-111-0/+18
| | | | | | calling the __cxa_bad_typeid function. Fixes PR7400. llvm-svn: 129273
* More __unknown_anytype work.John McCall2011-04-112-1/+27
| | | | llvm-svn: 129269
* When we know that a dynamic_cast always returns null, we can makeAnders Carlsson2011-04-111-0/+19
| | | | | | | CodeGenFunction::EmitDynamicCast always return null or throw a bad_cast exception. llvm-svn: 129264
* PR9669: implement correct checking for [dcl.init.string]p2.Eli Friedman2011-04-112-2/+4
| | | | llvm-svn: 129260
* Remove the CodeGenCXX/dyncast.cpp test; it isn't really super useful to ↵Anders Carlsson2011-04-101-367/+0
| | | | | | match on huge chunks of LLVM output. llvm-svn: 129258
* Simplify calling CheckPlaceholderExpr, converge on it in a few places,John McCall2011-04-102-8/+8
| | | | | | and move a vector-splat check to follow l-value conversion. llvm-svn: 129254
* Strip off parens and no-op casts when deciding if an expr can be ↵Anders Carlsson2011-04-101-1/+9
| | | | | | devirtualized. Fixes the second half of PR9660. llvm-svn: 129253
* Change CollectPrimaryBases to collect the bases in the right order. Fixes ↵Anders Carlsson2011-04-101-0/+22
| | | | | | one half of PR9660. llvm-svn: 129252
* Enhance the diagnostic for literal float -> int conversions to suggestChandler Carruth2011-04-102-7/+14
| | | | | | | | | | | | rewriting the literal when the value is integral. It is not uncommon to see code written as: const int kBigNumber = 42e5; Without any real awareness that this is no longer an ICE. The note helps automate and ease the process of fixing code that violates the warning. llvm-svn: 129243
* PR9580: Handle vectors correctly in ScalarExprEmitter::EmitRem.Eli Friedman2011-04-101-9/+125
| | | | | | | While I'm here, FileCheck-ize the ext-vector test, so we actually check what it is generating. llvm-svn: 129241
* MSVC accepts that default parameters be redefined for member functionsFrancois Pichet2011-04-101-0/+9
| | | | | | | | of template class. The new value is ignored. This fixes 1 error when parsing MSVC 2010 header files with clang. llvm-svn: 129240
* Fix a bunch of major problems with __unknown_anytype and properly testJohn McCall2011-04-092-0/+78
| | | | | | for them. The only major missing feature is references. llvm-svn: 129234
* Make sure we or together the overflow flags of the multiply and add, so theEli Friedman2011-04-091-1/+2
| | | | | | check is triggered appropriately. Reported on cfe-dev. llvm-svn: 129231
* strcat() and strncat() model additions to CStringChecker.Lenny Maiorani2011-04-091-0/+158
| | | | | | Validates inputs are not NULL, checks for overlapping strings, concatenates the strings checking for buffer overflow, sets the length of the destination string to the sum of the s1 length and the s2 length, binds the return value to the s1 value. llvm-svn: 129215
* PR8369: make __attribute((regparm(0))) work correctly. Original patch byEli Friedman2011-04-091-0/+5
| | | | | | pageexec@freemail.hu, tweaks by me. llvm-svn: 129206
* Clean up the bool conversion warning. Group it with other conversionChandler Carruth2011-04-091-6/+6
| | | | | | | warnings, and make its text appropriate for constant bool expressions other than 'false'. This should finish off PR9612. llvm-svn: 129205
* Add support for warning on general null pointer expressions of booleanChandler Carruth2011-04-091-1/+8
| | | | | | | type rather than just the literal 'false'. This begins fixing PR9612, but the message is now wrong. WIP, the cleanup of the messaging is next. llvm-svn: 129204
* add a __sync_swap builtin to fill out the rest of the __sync builtins. Chris Lattner2011-04-091-0/+5
| | | | | | Patch by Dave Zarzycki! llvm-svn: 129189
* Fixes a rewrting bug of a property-dot syntax expression insideFariborz Jahanian2011-04-081-0/+27
| | | | | | a block. First part of // rdar://9254348 llvm-svn: 129171
* Start overhauling static analyzer support for C++ constructors. The ↵Ted Kremenek2011-04-081-0/+25
| | | | | | | | | inlining support isn't complete, and needs to be reworked to model CallEnter/CallExit (just like all other calls). For now, treat constructors mostly like other function calls, making the analysis of C++ code just a little more useful. llvm-svn: 129166
* Warn for any kind of initialization if initializer does notFariborz Jahanian2011-04-084-3/+34
| | | | | | | implement lhs's protocols. // rdar://9091389. llvm-svn: 129142
OpenPOWER on IntegriCloud