summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Add AVX2 permute intrinsics. Also add parentheses on some macro arguments in ↵Craig Topper2011-12-241-1/+66
| | | | | | other intrinsic headers. llvm-svn: 147242
* Add AVX2 intrinsics for FP vbroadcast, vbroadcasti128, and vpblendd.Craig Topper2011-12-241-0/+35
| | | | llvm-svn: 147240
* Intrinsics for AVX2 unpack instructions.Craig Topper2011-12-241-0/+40
| | | | llvm-svn: 147237
* More AVX2 intrinsics for shift, psign, some shuffles, and psadbw.Craig Topper2011-12-241-82/+207
| | | | llvm-svn: 147236
* Fix several issues related to specializations and explicit instantiations.Nico Weber2011-12-231-0/+128
| | | | | | | | | | | | | | | Explicit instantiations following specializations are no-ops and hence have no PointOfInstantiation. That was done correctly in most cases, but for a specialization -> instantiation decl -> instantiation definition chain, the definition didn't realize that it was a no-op. Fix that. Also, when printing diagnostics for these no-ops, get the diag location from the decl name location. Add many test cases, one of them not yet passing (but it failed the same way before this change). Fixes http://llvm.org/pr11558 and more. llvm-svn: 147225
* Add AVX2 multiply intrinsics.Craig Topper2011-12-231-0/+35
| | | | llvm-svn: 147219
* Pass context and access to Parser::ParseExplicitInstantiation() forArgyrios Kyrtzidis2011-12-231-0/+8
| | | | | | | | good parser error recovery and for not crashing. We still have a accepts-invalid-code bug. llvm-svn: 147216
* objective-c: Use class definition AST in several situations whenFariborz Jahanian2011-12-231-0/+13
| | | | | | | building related objc ASTs which require a class definition AST. These were uncovered when testing objc rewriter. llvm-svn: 147210
* When building a module with an umbrella header, warn about any headersDouglas Gregor2011-12-232-3/+7
| | | | | | | | found within that umbrella directory that were not actually included by the umbrella header. They should either be referenced in the module map or included by the umbrella header. llvm-svn: 147207
* Colorize and condense CFG pretty-printing.Ted Kremenek2011-12-224-1468/+1398
| | | | llvm-svn: 147203
* Add -Wdangling-else.Nico Weber2011-12-221-0/+55
| | | | | | | This works like described in http://drdobbs.com/blogs/cpp/231602010 Fixes http://llvm.org/PR11609 llvm-svn: 147202
* Serialize the AST reader's mapping from canonical declarations to theDouglas Gregor2011-12-223-1/+10
| | | | | | | | | | | | | | | | set of (previously-canonical) declaration IDs to the module file, so that future AST reader instances that load the module know which declarations are merged. This is important in the fairly tricky case where a declaration of an entity, e.g., @class X; occurs before the import of a module that also declares that entity. We merge the declarations, and record the fact that the declaration of X loaded from the module was merged into the (now canonical) declaration of X that we parsed. llvm-svn: 147181
* Add missing triple to darwin clang driver test.Kevin Enderby2011-12-221-1/+1
| | | | llvm-svn: 147179
* If we end up merging an Objective-C class with an existing Objective-CDouglas Gregor2011-12-225-0/+26
| | | | | | | class that comes from a different module file, make sure that we load all of the pending declarations for the original declaration. llvm-svn: 147168
* Last part of support for generating dwarf for assembly source files. This getsKevin Enderby2011-12-222-0/+11
| | | | | | the clang driver to enable this when assembling a .s file. rdar://9275556 llvm-svn: 147167
* Overloading for initializer list construction.Sebastian Redl2011-12-221-5/+20
| | | | llvm-svn: 147156
* Fix a parser bug that prevented it from correctly parsing explicit construct ↵Sebastian Redl2011-12-221-1/+1
| | | | | | expressoins of the form T{args}. llvm-svn: 147155
* List-initialization via constructor part 1. Still needs: pretty-printing, ↵Sebastian Redl2011-12-223-28/+94
| | | | | | overloading, initializer_list. llvm-svn: 147145
* Add AVX2 intrinsics for max, min, sign extend, and zero extend.Craig Topper2011-12-221-0/+125
| | | | llvm-svn: 147141
* Fix typos in analyzer diagnostics pointed out by Matt Beaumont-Gay and ↵Ted Kremenek2011-12-221-1/+1
| | | | | | Robert Purves. llvm-svn: 147139
* In Lexer::getCharAndSizeSlow[NoWarn] if we come up againstArgyrios Kyrtzidis2011-12-221-0/+1
| | | | | | | | | | \<newline><newline> don't consume the second newline. Thanks to David Blaikie for pointing out the crash! llvm-svn: 147138
* Add support for bitcasts to vector type in Evaluate.Eli Friedman2011-12-222-4/+16
| | | | llvm-svn: 147137
* PR11614: Mark defaulted special constructors as constexpr if their implicitRichard Smith2011-12-227-13/+170
| | | | | | definition would satisfy the constexpr requirements. llvm-svn: 147128
* When deserializing an Objective-C class, check whether we have anotherDouglas Gregor2011-12-223-0/+45
| | | | | | | | | | | | | | | | declaration of that same class that either came from some other module or occurred in the translation unit loading the module. In this case, we need to merge the two redeclaration chains immediately so that all such declarations have the same canonical declaration in the resulting AST (even though they don't in the module files we've imported). Focusing on Objective-C classes until I'm happy with the design, then I'll both (1) extend this notion to other kinds of declarations, and (2) optimize away this extra checking when we're not dealing with modules. For now, doing this checking for PCH files/preambles gives us better testing coverage. llvm-svn: 147123
* PR11637: implement special-case constant evaluation for char arrays initializedRichard Smith2011-12-221-0/+14
| | | | | | by string literals. llvm-svn: 147120
* Fix regression in LiveVariables when reasoning about variables captured by ↵Ted Kremenek2011-12-221-1/+13
| | | | | | blocks. llvm-svn: 147116
* Fix a silly mistake in this test that somehow slipped into my last commit.Eli Friedman2011-12-221-1/+1
| | | | llvm-svn: 147112
* Fix a failure (which led to a crash) in constant emission code with vector ↵Eli Friedman2011-12-221-2/+3
| | | | | | compound literals. llvm-svn: 147111
* In Lexer::getCharAndSizeSlow[NoWarn] make sure we don't go over the end of ↵Argyrios Kyrtzidis2011-12-211-0/+3
| | | | | | | | | | the buffer when the end of the buffer is immediately after an escaped newline. Fixes http://llvm.org/PR10153. llvm-svn: 147091
* objc, objc rewriter. Fixes couple of bugs oneFariborz Jahanian2011-12-212-0/+21
| | | | | | | because of recent refactoring and one in the rewriter. llvm-svn: 147070
* For SourceManager::isBeforeInTranslationUnit(), have it consider macro arg ↵Argyrios Kyrtzidis2011-12-211-3/+4
| | | | | | | | | | expanded token locations as coming before the closing ')' of a function macro expansion. Include a unit test for SourceManager. llvm-svn: 147056
* Add a few more AVX2 intrinsics and fix the type strings on a couple SSE ↵Craig Topper2011-12-211-0/+10
| | | | | | intrinsics. llvm-svn: 147048
* Add AVX2 horizontal add/sub intrinsics.Craig Topper2011-12-211-0/+30
| | | | llvm-svn: 147047
* constexpr: diagnostic improvements for invalid lvalue-to-rvalue conversions inRichard Smith2011-12-214-49/+101
| | | | | | constant expressions. llvm-svn: 147035
* C++11 half of r147023: In C++11, additionally eagerly instantiate:Richard Smith2011-12-212-32/+19
| | | | | | | | - constexpr function template instantiations - variables of reference type - constexpr variables llvm-svn: 147031
* Attempt to fix test on 32-bit hosts.Eli Friedman2011-12-211-1/+1
| | | | llvm-svn: 147030
* Fix a case where Expr::isConstantInitializer would return true for an ↵Eli Friedman2011-12-211-1/+2
| | | | | | expression we can't support. In a slightly amusing twist, the case in question was already in the clang regression tests marked as a valid construct. <rdar://problem/10020074> llvm-svn: 147026
* C++ constant expression handling: eagerly instantiate static const integral dataRichard Smith2011-12-212-2/+7
| | | | | | | | members of class templates so that their values can be used in ICEs. This required reverting r105465, to get such instantiated members to be included in serialized ASTs. llvm-svn: 147023
* PR11297: Provide a better diagnostic for code which contains aRichard Smith2011-12-201-0/+30
| | | | | | | | reasonable-looking but ill-formed for-range statement of the form: for (expression : expression) llvm-svn: 147006
* [analyzer] Do not invalidate arguments when the parameter'sAnna Zaks2011-12-205-8/+79
| | | | | | | | | | | | | type is a pointer to const. (radar://10595327) The regions corresponding to the pointer and reference arguments to a function get invalidated by the calls since a function call can possibly modify the pointed to data. With this change, we are not going to invalidate the data if the argument is a pointer to const. This change makes the analyzer more optimistic in reporting errors. (Support for C, C++ and Obj C) llvm-svn: 147002
* objc/c++: Issue diagnostic when free-standing ivar is accessed Fariborz Jahanian2011-12-201-0/+26
| | | | | | in class method instead of crash. // rdar://10593227 llvm-svn: 146998
* When we make a previously-deserialized module definition visible,Douglas Gregor2011-12-202-0/+6
| | | | | | | notify the AST deserialization listener so that the AST writer knows that it can write the macro definition. llvm-svn: 146994
* Fix inversion of static analyzer path diagnostics for path conditions.Ted Kremenek2011-12-201-181/+309
| | | | llvm-svn: 146993
* Fix a crash on invalid, http://llvm.org/pr11599Nico Weber2011-12-201-0/+7
| | | | llvm-svn: 146988
* Let the KNR promotion warning be disabled.Roman Divacky2011-12-201-2/+1
| | | | | | Patch by Dimitry Andric! llvm-svn: 146982
* When performing name lookup for a redeclaration, ignore moduleDouglas Gregor2011-12-208-18/+48
| | | | | | | | | | | | | | | | | | | | | visibility restrictions. This ensures that all declarations of the same entity end up in the same redeclaration chain, even if some of those declarations aren't visible. While this may seem unfortunate to some---why can't two C modules have different functions named 'f'?---it's an acknowedgment that a module does not introduce a new "namespace" of names. As part of this, stop merging the 'module-private' bit from previous declarations to later declarations, because we want each declaration in a module to stand on its own because this can effect, for example, submodule visibility. Note that this notion of names that are invisible to normal name lookup but are available for redeclaration lookups is how we should implement friend declarations and extern declarations within local function scopes. I'm not tackling that problem now. llvm-svn: 146980
* When performing layout for an Objective-C class, make sure to dig outDouglas Gregor2011-12-201-0/+6
| | | | | | the definition of that class. Fixes PR11613 / <rdar://problem/10604077>. llvm-svn: 146976
* Add AVX2 intrinsics for pavg, pblend, and pcmp instructions. Also remove ↵Craig Topper2011-12-202-6/+60
| | | | | | unneeded builtins for SSE pcmp. Change SSE pcmpeqq and pcmpgtq to not use builtins and just use vector == and >. llvm-svn: 146969
* Revert r146766, and add a testcase for which it introduced a wrong-code bug.Richard Smith2011-12-201-0/+26
| | | | llvm-svn: 146961
* Unlike in C++03, a constant-expression is not an unevaluated operand in C++11.Richard Smith2011-12-203-1/+63
| | | | | | | | | | | | | | | | | | | | | | Split out a new ExpressionEvaluationContext flag for this case, and don't treat it as unevaluated in C++11. This fixes some crash-on-invalids where we would allow references to class members in potentially-evaluated constant expressions in static member functions, and also fixes half of PR10177. The fix to PR10177 exposed a case where template instantiation failed to provide a source location for a diagnostic, so TreeTransform has been tweaked to supply source locations when transforming a type. The source location is still not very good, but MarkDeclarationsReferencedInType would need to operate on a TypeLoc to improve it further. Also fix MarkDeclarationReferenced in C++98 mode to trigger instantiation for static data members of class templates which are used in constant expressions. This fixes a link-time problem, but we still incorrectly treat the member as non-constant. The rest of the fix for that issue is blocked on PCH support for early-instantiated static data members, which will be added in a subsequent patch. llvm-svn: 146955
OpenPOWER on IntegriCloud