summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Move test case to a more appropriate file.Zhongxing Xu2010-01-052-9/+10
| | | | llvm-svn: 92725
* Add test case.Zhongxing Xu2010-01-051-0/+9
| | | | llvm-svn: 92724
* When emitting member function pointers, use the canonical decl if the member ↵Anders Carlsson2010-01-051-0/+11
| | | | | | function is virtual. Fixes PR5940. llvm-svn: 92680
* Add a radar reference.Mike Stump2010-01-051-0/+1
| | | | llvm-svn: 92678
* Disallow captured arrays in blocks as well. Radar 7438948.Mike Stump2010-01-051-0/+8
| | | | llvm-svn: 92677
* Disallow capturing vlas inside blocks.Mike Stump2010-01-051-1/+11
| | | | llvm-svn: 92676
* Make static analysis support for C++ 'this' expression context-sensitive. ↵Ted Kremenek2010-01-051-0/+43
| | | | | | Essentially treat 'this' as a implicit parameter to the method call, and associate a region with it. llvm-svn: 92675
* Avoid warnings for functions that return a value using MS-style inlineMike Stump2010-01-041-1/+0
| | | | | | | | | | | | | assembly code. This avoids changing the bahvior when normal asm("") statements are used. The type of code affected would be: void* t4(void) { __asm mov eax, fs:[0x10] } I hope people like this version, if not, let me know. llvm-svn: 92531
* -Wsign-compare shouldn't warn when the signed operand is a conditional operatorJohn McCall2010-01-041-0/+3
| | | | | | | whose operands are non-negative integer constant expressions. This comes up in LLVM in a few places. llvm-svn: 92525
* Make sure to use ASTContext::getAs*ArrayType() when decomposing arrayDouglas Gregor2010-01-041-0/+2
| | | | | | types. Fixes APFloat.cpp compilation failure. llvm-svn: 92523
* Teach Preprocessor::macro_begin/macro_end to lazily load all macroDouglas Gregor2010-01-042-7/+12
| | | | | | | | definitions from a precompiled header. This ensures that code-completion with macro names behaves the same with or without precompiled headers. llvm-svn: 92497
* Revert r92431, this code isn't dead and broke the ntfs build.Daniel Dunbar2010-01-041-0/+9
| | | | llvm-svn: 92493
* When declaring an Objective-C implementation without a correspondingDouglas Gregor2010-01-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | interface, suggest correction of typos. For example, given: @interface NSString @end @implementation NSstring @end we'll warn with: t.m:4:19: warning: cannot find interface declaration for 'NSstring'; did you mean 'NSString'? @implementation NSstring ^ However, since this is just a warning, we don't provide a fix-it hint. Good idea, Ted! llvm-svn: 92488
* __builtin_object_size(ptr, type) returns -1 for type = {0,1} if there are ↵Benjamin Kramer2010-01-031-0/+11
| | | | | | any side-effects. llvm-svn: 92453
* Implement typo correction for a variety of Objective-C-specificDouglas Gregor2010-01-033-3/+83
| | | | | | | | | | | | | | constructs: - Instance variable lookup ("foo->ivar" and, in instance methods, "ivar") - Property name lookup ("foo.prop") - Superclasses - Various places where a class name is required - Protocol names (e.g., id<proto>) This seems to cover many of the common places where typos could occur. llvm-svn: 92449
* Better coverage for -dump-record-layouts and -print-decl-contexts.Eli Friedman2010-01-032-0/+3
| | | | llvm-svn: 92441
* Improve coverage for test.Eli Friedman2010-01-031-0/+2
| | | | llvm-svn: 92440
* Add test for annotate attribute for coverage.Eli Friedman2010-01-031-0/+8
| | | | llvm-svn: 92435
* Fix minor oversight for increment/decrement of complex int. Add tests forEli Friedman2010-01-032-1/+35
| | | | | | coverage. llvm-svn: 92433
* Add a couple more tests for coverage.Eli Friedman2010-01-021-1/+10
| | | | llvm-svn: 92430
* Correctly pass VTT parameters to constructors and destructors. The VTTs ↵Anders Carlsson2010-01-023-7/+7
| | | | | | aren't yet used in the ctors/dtors, but that will follow. llvm-svn: 92409
* Make sure that the search for visible declarations looks into the semantic ↵Douglas Gregor2010-01-011-0/+10
| | | | | | parents of out-of-line function contexts llvm-svn: 92397
* Fix typo test RUN linesDouglas Gregor2010-01-013-3/+3
| | | | llvm-svn: 92396
* When typo correction for an id-expression finds a type (or Objective-CDouglas Gregor2010-01-011-0/+9
| | | | | | | | | | | | | | | | class), provide a suggestion for the type or class found. However, since we can't recover properly in this case, don't provide a fix-it hint. Example: test/FixIt/typo.m:8:3: error: use of undeclared identifier 'NSstring'; did you mean 'NSString'? NSstring *str = @"A string"; ... ^ 1 diagnostic generated. llvm-svn: 92379
* Typo correction for C99 designated field initializers, e.g.,Douglas Gregor2010-01-011-0/+22
| | | | | | | | | | test/FixIt/typo.c:19:4: error: field designator 'bunds' does not refer to any field in type 'struct Window'; did you mean 'bounds'? .bunds. ^~~~~ bounds llvm-svn: 92376
* If the key function of a record is inline, then the RTTI data should have ↵Anders Carlsson2009-12-311-0/+9
| | | | | | weak_odr linkage. llvm-svn: 92371
* Make sure that an overriding return type is complete before checking if it's ↵Anders Carlsson2009-12-311-0/+47
| | | | | | 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
* Typo correction for C++ base and member initializers, e.g.,Douglas Gregor2009-12-311-0/+8
| | | | | | | | | | | | | | | 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-311-1/+2
| | | | | | | | | | 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-311-0/+4
| | | | | | | | | | 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-311-1/+2
| | | | | | s.fnd("hello") llvm-svn: 92345
* Let constraint manager inform checkers that some assumption logic has happend.Zhongxing Xu2009-12-311-0/+8
| | | | | | | | | 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-312-2/+15
| | | | | | | | | | | | | 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-311-0/+10
| | | | | | | 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-301-4/+67
| | | | llvm-svn: 92319
* testcase for previous patch!Chris Lattner2009-12-302-4/+6
| | | | llvm-svn: 92317
* fix PR5917, L'x' was getting the wrong type in c++ mode. PerChris Lattner2009-12-301-0/+14
| | | | | | C++2.13.2p2: "A wide-character literal has type wchar_t" llvm-svn: 92313
* Typo correction for type names when they appear in declarations, e.g., givenDouglas Gregor2009-12-301-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | 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
* More fixes to the handling of CVR-comparisons on array types. Adds a method toChandler Carruth2009-12-301-0/+5
| | | | | | | | | | | | 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-302-2/+23
| | | | llvm-svn: 92284
* Typedefs can be redeclared. That seems like something we should record inJohn McCall2009-12-301-0/+8
| | | | | | 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
* Handle enum types as well.Anders Carlsson2009-12-291-0/+9
| | | | llvm-svn: 92276
* Fix function type RTTI linkage and add tests.Anders Carlsson2009-12-291-1/+16
| | | | llvm-svn: 92266
* Fix support for const_cast<>s of array types which actual change theChandler Carruth2009-12-291-1/+2
| | | | | | | | 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
* fix whitespace in test to match llvm asmprinter change.Chris Lattner2009-12-291-1/+1
| | | | llvm-svn: 92251
OpenPOWER on IntegriCloud