summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* It's OK for a return type to be incomplete if it's being defined.Anders Carlsson2009-12-311-3/+6
| | | | llvm-svn: 92367
* Make sure that an overriding return type is complete before checking if it's ↵Anders Carlsson2009-12-313-0/+59
| | | | | | covariant. Fixes PR5920. llvm-svn: 92365
* Remove rtti.cpp, it's very fragile and has been marked XFAIL for a while ↵Anders Carlsson2009-12-311-205/+0
| | | | | | now. Between rtti-layout.cpp and rtti-linkage.cpp, RTTI testing should be covered. llvm-svn: 92361
* More RTTI builder cleanup.Anders Carlsson2009-12-311-76/+26
| | | | llvm-svn: 92360
* Avoid an unnecessary copy of Predefines. getMemBufferCopy does the null ↵Benjamin Kramer2009-12-311-12/+3
| | | | | | termination for us. llvm-svn: 92358
* Convert to StringRef, avoid a memcpy in the common case.Benjamin Kramer2009-12-311-19/+16
| | | | llvm-svn: 92357
* Typo correction for C++ base and member initializers, e.g.,Douglas Gregor2009-12-313-32/+99
| | | | | | | | | | | | | | | test/FixIt/typo.cpp:41:15: error: initializer 'base' does not name a non-static data member or base class; did you mean the base class 'Base'? Derived() : base(), ^~~~ Base test/FixIt/typo.cpp:42:15: error: initializer 'ember' does not name a non-static data member or base class; did you mean the member 'member'? ember() { } ^~~~~ member llvm-svn: 92355
* Add another typo test for nested-name-specifiersDouglas Gregor2009-12-311-0/+2
| | | | llvm-svn: 92351
* Typo correction for identifiers within nested name specifiers, e.g.,Douglas Gregor2009-12-312-1/+24
| | | | | | | | | | typo.cpp:18:1: error: use of undeclared identifier 'other_std'; did you mean 'otherstd'? other_std::strng str1; ^~~~~~~~~ otherstd llvm-svn: 92350
* Typo correction for template names, e.g.,Douglas Gregor2009-12-313-1/+32
| | | | | | | | | | typo.cpp:27:8: error: no template named 'basic_sting' in namespace 'std'; did you mean 'basic_string'? std::basic_sting<char> b2; ~~~~~^~~~~~~~~~~ basic_string llvm-svn: 92348
* Typo correction for member access into classes/structs/unions, e.g.,Douglas Gregor2009-12-314-5/+33
| | | | | | s.fnd("hello") llvm-svn: 92345
* Let constraint manager inform checkers that some assumption logic has happend.Zhongxing Xu2009-12-318-14/+91
| | | | | | | | | Add new states for symbolic regions tracked by malloc checker. This enables us to do malloc checking more accurately. See test case. Based on Lei Zhang's patch and discussion. llvm-svn: 92342
* Implement typo correction for id-expressions, e.g.,Douglas Gregor2009-12-318-25/+75
| | | | | | | | | | | | | typo.cpp:22:10: error: use of undeclared identifier 'radious'; did you mean 'radius'? return radious * pi; ^~~~~~~ radius This was super-easy, since we already had decent recovery by looking for names in dependent base classes. llvm-svn: 92341
* improve diagnostics for case when a field type is unknown byChris Lattner2009-12-312-1/+12
| | | | | | | not emitting a follow-on error about 'int', which the user never wrote. PR5924. llvm-svn: 92339
* Fix a bunch of bugs with VMI RTTI building, and add a whole bunch of tests.Anders Carlsson2009-12-303-219/+257
| | | | llvm-svn: 92319
* The element type should also be canonicalized. Add a case for VariableArrayType.Zhongxing Xu2009-12-301-1/+7
| | | | llvm-svn: 92318
* testcase for previous patch!Chris Lattner2009-12-302-4/+6
| | | | llvm-svn: 92317
* when making a decl for __builtin_fabsf() make sure toChris Lattner2009-12-301-0/+4
| | | | | | | | attach the appropriate attributes to it. I don't think this manifests as any real change though, we're still not getting the right LLVM IR attributes out of codegen. llvm-svn: 92316
* Fix a comment.Zhongxing Xu2009-12-301-1/+1
| | | | llvm-svn: 92314
* fix PR5917, L'x' was getting the wrong type in c++ mode. PerChris Lattner2009-12-302-2/+22
| | | | | | C++2.13.2p2: "A wide-character literal has type wchar_t" llvm-svn: 92313
* When rewriting a __block declaration, use a suitable API to get location ofFariborz Jahanian2009-12-301-1/+3
| | | | | | the declaration in the presence of an initializer macro. llvm-svn: 92312
* remove extraneous #includeChris Lattner2009-12-301-1/+0
| | | | llvm-svn: 92310
* Typo correction for type names when they appear in declarations, e.g., givenDouglas Gregor2009-12-307-3/+587
| | | | | | | | | | | | | | | | | | | | | | | | tring str2; we produce the following diagnostic + fix-it: typo.cpp:15:1: error: unknown type name 'tring'; did you mean 'string'? tring str2; ^~~~~ string To make this really useful, we'll need to introduce typo correction in many more places (wherever we do name lookup), and implement declaration-vs-expression heuristics that cope with typos better. However, for now this will handle the simple cases where we already get good "unknown type name" diagnostics. The LookupVisibleDecls functions are intended to be used by code completion as well as typo correction; that refactoring will happen later. llvm-svn: 92308
* Fix typo in commentDouglas Gregor2009-12-301-1/+1
| | | | llvm-svn: 92307
* Remove an duplicated #include.Zhongxing Xu2009-12-301-1/+0
| | | | llvm-svn: 92306
* Simplify code by using an equivalent template class.Zhongxing Xu2009-12-301-11/+2
| | | | llvm-svn: 92305
* More fixes to the handling of CVR-comparisons on array types. Adds a method toChandler Carruth2009-12-303-9/+34
| | | | | | | | | | | | QualType to get CVR-qualifiers through array types, and switches the primary comparison methods to use it. This may allow simplifying some of the callers of getUnqualifiedArrayType. Also fix the normalizing of CV-qualification during template deduction to normalize through arrays and allow a more qualified deduced array type. This fixes PR5911. llvm-svn: 92289
* Add base class checks.Anders Carlsson2009-12-301-0/+11
| | | | llvm-svn: 92286
* Add more vtable tests.Anders Carlsson2009-12-301-1/+38
| | | | llvm-svn: 92285
* More RTTI cleanup, test that RTTI classes have the correct vtables.Anders Carlsson2009-12-303-54/+80
| | | | llvm-svn: 92284
* Typedefs can be redeclared. That seems like something we should record inJohn McCall2009-12-305-5/+35
| | | | | | the AST lest we run into some crazy canonicalization bug like PR5874. llvm-svn: 92283
* Test for PR5908.Eli Friedman2009-12-301-0/+7
| | | | llvm-svn: 92282
* Make sure to explicitly pass type/value dependence to Expr constructor. ThisEli Friedman2009-12-304-52/+61
| | | | | | | | caught several cases where we were not doing the right thing. I'm not completely sure all cases are being handled correctly, but this should be an improvement. llvm-svn: 92281
* Match gcc and treat vector types as fundamental types.Anders Carlsson2009-12-291-9/+23
| | | | llvm-svn: 92278
* Handle enum types as well.Anders Carlsson2009-12-292-3/+31
| | | | llvm-svn: 92276
* Test linkage of RTTI descriptors of array types.Anders Carlsson2009-12-291-29/+61
| | | | llvm-svn: 92274
* Fix function type RTTI linkage and add tests.Anders Carlsson2009-12-292-5/+30
| | | | llvm-svn: 92266
* Fix support for const_cast<>s of array types which actual change theChandler Carruth2009-12-292-3/+5
| | | | | | | | CV-qualifiers. Remove an error expectation from the 'good' set of const-cast test cases. With this patch, the final non-template test case from PR5542 passes. (It's the same as the one already in const-cast.cpp.) llvm-svn: 92257
* strength reduce this call away.Chris Lattner2009-12-291-1/+2
| | | | llvm-svn: 92253
* fix whitespace in test to match llvm asmprinter change.Chris Lattner2009-12-291-1/+1
| | | | llvm-svn: 92251
* Correctly refer to element CVR qualifications when determining if a type isChandler Carruth2009-12-296-60/+93
| | | | | | | | | | more or less cv-qualified than another during implicit conversion and overload resolution ([basic.type.qualifier] p5). Factors the logic out of template deduction and into the ASTContext so it can be shared. This fixes several aspects of PR5542, but not all of them. llvm-svn: 92248
* Get rid of FixedWidthIntType, as suggested by Chris and Eli.Anders Carlsson2009-12-2918-157/+11
| | | | llvm-svn: 92246
* Handle using declarations in overloaded and template functions during ADL andChandler Carruth2009-12-293-11/+29
| | | | | | | | | | address resolution. This fixes PR5751. Also, while we're here, remove logic from ADL which mistakenly included the definition namespaces of overloaded and/or templated functions whose name or address is used as an argument. llvm-svn: 92245
* adjust for llvm api changes.Chris Lattner2009-12-281-10/+2
| | | | llvm-svn: 92236
* this form of SetDebugLocation is about to go away, add some #includes thatChris Lattner2009-12-282-7/+15
| | | | | | are about to not come in implicitly. llvm-svn: 92228
* Adjust indentation.Zhongxing Xu2009-12-281-1/+1
| | | | llvm-svn: 92205
* Fix 80-col violation.Zhongxing Xu2009-12-281-1/+1
| | | | llvm-svn: 92204
* use best-fit instead of first-fit when reusing a MacroArgs object,Chris Lattner2009-12-281-7/+16
| | | | | | this speeds up Eonly on the testcase in PR5888 from 30.5s to 0.85s llvm-svn: 92203
* The PreExpArgTokens array is indexed with an argument #,Chris Lattner2009-12-283-7/+8
| | | | | | | not a token number. Fix the reserve logic to get the right amount of space. llvm-svn: 92202
* Fix for PR5871. Make __PRETTY_FUNCTION__ work for member functions defined ↵Sam Weinig2009-12-282-5/+46
| | | | | | in a class local to a function. llvm-svn: 92200
OpenPOWER on IntegriCloud