summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Diagnose the use of incomplete types in C++ typeid expressionsDouglas Gregor2009-12-232-4/+11
| | | | llvm-svn: 92045
* Rename test file.Ted Kremenek2009-12-231-0/+0
| | | | llvm-svn: 92044
* Change test case to use 'clang -cc1' (without --disable-free) instead of ↵Ted Kremenek2009-12-231-5/+6
| | | | | | c-index-test (whose memory management behavior may change in the future). llvm-svn: 92043
* Remove cv-qualifiers from the argument to typeidDouglas Gregor2009-12-231-4/+7
| | | | llvm-svn: 92041
* Mangle template template parameters. Fixes PR5861.Anders Carlsson2009-12-231-0/+16
| | | | llvm-svn: 92030
* fix the microsoft "charify" extension to return the charified token Chris Lattner2009-12-231-0/+6
| | | | | | | as a character literal, not a string literal. This might fix rdar://7486575 llvm-svn: 92025
* Fix the overflow calculation in Sema::CheckTemplateArgument to be a bit moreEli Friedman2009-12-231-1/+11
| | | | | | accurate. llvm-svn: 92018
* When using a default function argument for a function template (orDouglas Gregor2009-12-231-1/+23
| | | | | | | | | | | | | | | | | member function thereof), perform the template instantiation each time the default argument is needed. This ensures that (1) We get different CXXTemporary objects for each instantiation, and (2) Any other instantiations or definitions triggered by the instantiation of the default argument expression are guaranteed to happen; previously, they might have been suppressed, e.g., because they happened in an unevaluated context. This fixes the majority of PR5810. However, it does not address the problem where we may have multiple uses of the same CXXTemporary within an expression when the temporary came from a non-instantiated default argument expression. llvm-svn: 92015
* Remove RewriteBlocks. It has been superseded by RewriteObjCKovarththanan Rajaratnam2009-12-231-38/+0
| | | | llvm-svn: 92014
* Add 'DeclStmt::DoDestroy()' which doesn't actually recurse over its child ↵Ted Kremenek2009-12-231-0/+13
| | | | | | expressions (via StmtIterator), as those expressions are owned by the Decls and Types (which are destroyed elsewhere). This fixes a crasher reported in <rdar://problem/7487294>. llvm-svn: 91990
* Add CFG support for the condition variable that can appear in IfStmts in C++ ↵Ted Kremenek2009-12-231-0/+7
| | | | | | | | mode. Add transfer function support in GRExprEngine for IfStmts with initialized condition variables. llvm-svn: 91987
* Suppress dead store warnings involving objects initialized with ↵Ted Kremenek2009-12-231-0/+26
| | | | | | CXXExprTemporaries. llvm-svn: 91986
* Update for the intrinsic changes in llvm: the object size intrinsicEric Christopher2009-12-231-1/+1
| | | | | | | only takes a boolean second argument now. Update tests accordingly. Currently the builtin still accepts the full range for compatibility. llvm-svn: 91983
* Fix PR 5857. When casting from a symbolic region to an integer back to a ↵Ted Kremenek2009-12-231-1/+27
| | | | | | pointer value, we were not correctly layering the correct ElementRegion on the original SymbolicRegion. llvm-svn: 91981
* Also treat the type of the subexpression as a pointer in ↵Ted Kremenek2009-12-231-0/+11
| | | | | | GRExprEngine::VisitCast when the expression is handled as an lvalue. llvm-svn: 91969
* Test case for PR5134.John McCall2009-12-231-0/+7
| | | | llvm-svn: 91965
* Driver: Fix '... -O4 -O0 ...', which was generating bitcode.Daniel Dunbar2009-12-231-0/+10
| | | | llvm-svn: 91962
* Test case from PR5476.John McCall2009-12-231-0/+11
| | | | llvm-svn: 91957
* Set a member's access specifier even if it doesn't match the previous specifier.John McCall2009-12-231-0/+11
| | | | | | | | Prevents an assert on successive redeclarations. Fixed PR5573. llvm-svn: 91956
* Add basic support for analyzing CastExprs as lvalues.Ted Kremenek2009-12-231-0/+11
| | | | llvm-svn: 91952
* Objective-C methods can be variadic, too. Who knew.Douglas Gregor2009-12-231-0/+10
| | | | llvm-svn: 91951
* warn when attribute warn_unused_result is applied to void functions.Nuno Lopes2009-12-221-2/+4
| | | | | | while at it, remove an outdated FIXME llvm-svn: 91946
* Allow the first parameter of operator new to be a cv-qualifiedDouglas Gregor2009-12-221-2/+2
| | | | | | | | size_t. Also, fix an issue with initialization of parameters in calls, where we weren't removing the cv-qualifiers on the parameter type itself. Fixes PR5823. llvm-svn: 91941
* Make sure that reinterpret_cast gets a CastKind on all successfulDouglas Gregor2009-12-221-0/+6
| | | | | | | paths. Fixes "cannot compile this unexpected cast lvalue yet" error in llvm/lib/Analysis/IPA/GlobalsModRef.cpp. llvm-svn: 91932
* Add using shadow decls to the "instantiated locals" map, fixing PR5847.John McCall2009-12-221-0/+14
| | | | llvm-svn: 91928
* Switch Sema::AddCXXDirectInitializerToDecl over to InitializationSequenceDouglas Gregor2009-12-224-8/+7
| | | | llvm-svn: 91927
* Add transfer functions support for visiting an Objective-C message ↵Ted Kremenek2009-12-221-0/+31
| | | | | | expression as an lvalue when the return type is a C++ reference. llvm-svn: 91926
* Serialize the NoReturn bit on FunctionTypes for precompiled headersDouglas Gregor2009-12-222-0/+7
| | | | llvm-svn: 91911
* Enter the scope of an initializer for direct-initialization as well asDouglas Gregor2009-12-221-0/+2
| | | | | | for copy-initialization. llvm-svn: 91909
* When transforming a C++ "new" expression that was not explicitly givenDouglas Gregor2009-12-221-0/+14
| | | | | | | a size, check whether the transformed type is itself an array type. If so, take the major array bound as the size to allocate. Fixes PR5833. llvm-svn: 91907
* Switch initialization of parameters in a call over toDouglas Gregor2009-12-225-11/+10
| | | | | | | | | | | InitializationSequence (when a FunctionDecl is present). This required a few small fixes to initialization sequences: - Make sure to use the adjusted parameter type for initialization of function parameters. - Implement transparent union calling semantics in C llvm-svn: 91902
* Make sure that we mangle overloaded operators that are member functions ↵Anders Carlsson2009-12-222-3/+21
| | | | | | | | correctly, giving them the correct arity. With this seemingly insignificant fix, we are now able to build and link clang using clang itself! (LLVM still has to be built with gcc for the time being). llvm-svn: 91893
* fix a bug handling the gnu ?: extension. Patch by Storlek on IRC,Chris Lattner2009-12-221-0/+1
| | | | | | who prefers to be stealthy and mysterious. llvm-svn: 91888
* When we simply return a retained member expression when instantiating, we ↵Anders Carlsson2009-12-221-0/+27
| | | | | | must also mark the member decl as referenced. llvm-svn: 91887
* Switch default arguments over to InitializationSequence.Eli Friedman2009-12-223-3/+3
| | | | llvm-svn: 91883
* Switch file-scope assignment initialization over to InitializationSequence.Eli Friedman2009-12-226-9/+9
| | | | llvm-svn: 91881
* x86_64: Structures with no fields but which have padding should be classified asDaniel Dunbar2009-12-222-2/+5
| | | | | | | | integer. - This is consistent, but may not be correct. I will revisit x86_64 ABI handling for C++ as a whole at some point. - PR5831. llvm-svn: 91874
* When converting from a type to itself or one of its base classes via aDouglas Gregor2009-12-221-0/+14
| | | | | | | | | constructor call, the conversion is only a standard conversion sequence if that constructor is a copy constructor. This fixes PR5834 in a semi-lame way, because the "real" fix will be to move over to InitializationSequence. That will happen "soonish", but not now. llvm-svn: 91861
* When filling in value initializations within an initializer list, beDouglas Gregor2009-12-221-0/+17
| | | | | | | sure to fill in the initialized member of a union when a member was explicitly designated. Fixes PR5843. llvm-svn: 91858
* ARM: Honor -mfpu= and set __VFP_FP__ and __ARM_NEON__ "correctly".Daniel Dunbar2009-12-211-1/+0
| | | | | | | | - Correctly is in quotes, because we are following what I interpreted as GCC's intent (which diverges from practice, naturally). - Also, fix the arch define for arm1136jf-s. llvm-svn: 91855
* When a template-id refers to a single function template, and theDouglas Gregor2009-12-212-2/+39
| | | | | | | | | | explicitly-specified template arguments are enough to determine the instantiation, and either template argument deduction fails or is not performed in that context, we can resolve the template-id down to a function template specialization (so sayeth C++0x [temp.arg.explicit]p3). Fixes PR5811. llvm-svn: 91852
* Allow comparison of 'void *' with function pointer Fariborz Jahanian2009-12-211-0/+9
| | | | | | as a g++ extension (fixes radar 7481987). llvm-svn: 91827
* Fix for PR5840: fix the kind of name lookup used for classes inEli Friedman2009-12-211-0/+8
| | | | | | | | | | Sema::getTypeName. "LookupNestedNameSpecifierName" isn't quite the right kind of lookup, though; it doesn't ignore namespaces. Someone more familiar with the lookup code should fix this properly. llvm-svn: 91809
* Add tests for structs inside anonymous namespaces.Anders Carlsson2009-12-211-2/+17
| | | | llvm-svn: 91806
* Incomplete structs should also have internal linkage.Anders Carlsson2009-12-211-0/+2
| | | | llvm-svn: 91805
* Correcly handle pointers to member pointer types where the class or the ↵Anders Carlsson2009-12-202-5/+28
| | | | | | pointee is incomplete. llvm-svn: 91804
* fix PR4010: add support for the warn_unused_result for function pointersNuno Lopes2009-12-201-0/+5
| | | | llvm-svn: 91803
* fix PR5500: clang fails to parse inline asm with :: in C++ mode Chris Lattner2009-12-201-0/+6
| | | | llvm-svn: 91802
* a really old testcase I apparently forgot to 'svn add'.Chris Lattner2009-12-201-0/+33
| | | | llvm-svn: 91800
* Rework the way pointer types are handled by the RTTI builder. We now get the ↵Anders Carlsson2009-12-202-6/+29
| | | | | | right linkage for indirect pointers to incomplete structs. llvm-svn: 91799
OpenPOWER on IntegriCloud