summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
Commit message (Collapse)AuthorAgeFilesLines
* If an instantiation of a template is required to be a complete type, checkRichard Smith2014-05-073-11/+79
| | | | | | | whether the definition of the template is visible rather than checking whether the instantiated definition happens to be in an imported module. llvm-svn: 208150
* Try harder to ensure a strict weak ordering of overload candidates thatKaelyn Takata2014-05-071-6/+11
| | | | | | have arity mismatches. llvm-svn: 208146
* [OPENMP] Initial codegen for '#pragma omp parallel'Alexey Bataev2014-05-063-20/+116
| | | | llvm-svn: 208077
* Fix crash when one overload candidate is a template instead of a function. ↵Nick Lewycky2014-05-061-0/+1
| | | | | | | | | | Patch by Kaelyn Takata. Testcase coming out of creduce will land in a separate commit shortly. Also, it appears that this callback is used even in a SFINAE context where the results are never displayed. llvm-svn: 208062
* [OPENMP] 'proc_bind' clause support - Parsing and sema analysis for OpenMP ↵Alexey Bataev2014-05-062-0/+61
| | | | | | clause 'proc_bind' llvm-svn: 208060
* Support field references to struct names and c++11 aliases from inline asm.Nico Weber2014-05-061-1/+3
| | | | | | This is in addition to the existing support for typedefs. llvm-svn: 208053
* StringRefize and take out an old FIXMEAlp Toker2014-05-051-3/+4
| | | | llvm-svn: 207962
* Make module self-import an errorBen Langmuir2014-05-051-0/+7
| | | | | | | | Ideally, importing Foo.a from Foo.b would "do the right thing", but until it does, this patch makes it an error rather than allow it to silently be ignored. llvm-svn: 207948
* Minor cleanups, no behavior change.Nico Weber2014-05-031-11/+9
| | | | | | | | | | * Fixes a "return" that was indented at the same level as the continuation from the previous line * Wrap several lines to 80 columns * Remove an if check that was always true * Move a variable declaration slightly closer to its use llvm-svn: 207922
* Wrap a few lines at 80 columns, change a confusing indent. No behavior change.Nico Weber2014-05-032-9/+9
| | | | llvm-svn: 207921
* Fix a bunch of mislayered clang/Lex includes from SemaAlp Toker2014-05-0321-108/+91
| | | | llvm-svn: 207896
* Revert "Sema: Implement DR244"David Majnemer2014-05-031-3/+3
| | | | | | | | This was accidentally committed. This reverts commit r207892. llvm-svn: 207893
* Sema: Implement DR244David Majnemer2014-05-031-3/+3
| | | | | | | | | Naming the destructor using a typedef-name for the class-name is well-formed. This fixes PR19620. llvm-svn: 207892
* Rewrite NRVO determination. Track NRVO candidates on the parser Scope and ↵Nick Lewycky2014-05-036-62/+109
| | | | | | | | apply the NRVO candidate flag to all possible NRVO candidates here, and remove the flags in computeNRVO or upon template instantiation. A variable now has NRVO applied if and only if every return statement in that scope returns that variable. This is nearly optimal. Performs NRVO roughly 7% more often in a bootstrap build of clang. Patch co-authored by Richard Smith. llvm-svn: 207890
* Updated the attribute tablegen emitter for variadic arguments to emit a ↵Aaron Ballman2014-05-021-5/+2
| | | | | | range accessor in addition to the iterators. Updated code using iterators to use range-based for loops. llvm-svn: 207837
* Handle -fdelayed-template-parsing of out-of-line definitions ofHans Wennborg2014-05-021-33/+41
| | | | | | | | | | | class template member classes (PR19613) Also improve this code in general by implementing suggestions from Richard. Differential Revision: http://reviews.llvm.org/D3555?id=9020 llvm-svn: 207822
* Use std::abs(int) portably.David Blaikie2014-05-011-2/+3
| | | | | | Code review feedback from Reid Kleckner on r207806. llvm-svn: 207811
* Fix some -Wabsolute-value warnings introduced in r207796.David Blaikie2014-05-011-2/+2
| | | | llvm-svn: 207806
* When sorting overload candidates, sort arity mismatches in ascendingKaelyn Takata2014-05-011-3/+16
| | | | | | | | order by the number of missing or extra parameters. This is useful if there are more than a few overload candidates with arity mismatches, particularly in the presence of -fshow-overloads=best. llvm-svn: 207796
* AST: Mangle reference temporaries reliablyDavid Majnemer2014-05-013-53/+56
| | | | | | | | | | | | | | | Summary: Previously, we would generate a single name for all reference temporaries and allow LLVM to rename them for us. Instead, number the reference temporaries as we build them in Sema. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3554 llvm-svn: 207776
* MSVCCompat: Don't produce an invalid AST when accepting void pseudo-dtorsReid Kleckner2014-05-011-2/+3
| | | | | | | | | | | | | We accept 'void *p; p->~void();' for MSVC compatibility since r148682. However, we were returning ExprError, rather than producing an AST, despite only diagnosing it with a warning. CodeGen noticed that the template function specialization had an invalid AST, and therefore didn't generate code for it. This change makes us produce an AST with a void pseudo-dtor call. Part of PR18256. llvm-svn: 207771
* Add support for __declspec(thread) under -fms-extensionsReid Kleckner2014-05-011-0/+22
| | | | | | | | Reviewers: rsmith Differential Revision: http://reviews.llvm.org/D3551 llvm-svn: 207734
* Make typo-correction of inheriting constructors work a bit better. LimitRichard Smith2014-05-012-55/+119
| | | | | | | correction to direct base class members, and recover properly after we apply such a correction. llvm-svn: 207731
* Sema: Implement DR477David Majnemer2014-04-301-2/+29
| | | | | | | | | | | | Summary: Friend declarations shouldn't mention explicit or virtual. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3562 llvm-svn: 207682
* When typo-correcting a member using declaration, don't exclude member templates.Richard Smith2014-04-301-4/+0
| | | | llvm-svn: 207681
* When typo-correcting a member using-declaration, only consider members of ↵Richard Smith2014-04-301-10/+11
| | | | | | base classes. llvm-svn: 207680
* Fix crash if typo correction corrects a member using-declaration to aRichard Smith2014-04-301-0/+6
| | | | | | non-member declaration. Patch by Dinesh Dwivedi! llvm-svn: 207677
* __thread: Move constant init check to CheckCompleteVariableDeclarationReid Kleckner2014-04-301-21/+20
| | | | | | | | | | We were emitting dynamic initializers for __thread variables if there was no explicit initializer, as in this test case: struct S { S(); }; __thread S s; llvm-svn: 207675
* -Wunused-parameter: Don't fire on defaulted or deleted functionsReid Kleckner2014-04-301-1/+3
| | | | | | | | Patch by Dinesh Dwivedi! Differential Revision: http://reviews.llvm.org/D3376 llvm-svn: 207672
* [ARM64] Add arm64_be where it was accidentally missed from a bunch of ↵James Molloy2014-04-302-2/+5
| | | | | | | | | if-conditions. I think this is the last commit for ARM64 big endian in clang. This commit makes arm_neon.h compile correctly. llvm-svn: 207624
* Objective-C. Improve diagnosis of bridging types.Fariborz Jahanian2014-04-293-45/+22
| | | | | | // rdar://16737117 llvm-svn: 207542
* CodeGen: Fix linkage of reference temporariesDavid Majnemer2014-04-281-1/+2
| | | | | | | | | | | | | | | Summary: A reference temporary should inherit the linkage of the variable it initializes. Otherwise, we may hit cases where a reference temporary wouldn't have the same value in all translation units. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3515 llvm-svn: 207451
* [SemaCXX] Silence -Wconstant-logical-operand if the operand is a 0/1 from a ↵Argyrios Kyrtzidis2014-04-281-1/+2
| | | | | | | | | | | macro. Libraries specify enabled/disabled features using macro defs of 0/1, in such cases the -Wconstant-logical-operand is noise. rdar://15410291 llvm-svn: 207386
* [Sema] Adjust Sema::getCurBlock()/getCurLambda() to take into account that ↵Argyrios Kyrtzidis2014-04-263-4/+21
| | | | | | | | | | | we may have switch CurContext due to class template instantiation. Fixes crash of the included test case. rdar://16527205 llvm-svn: 207325
* PR19558: don't produce an "unused variable" warning for a variable template ↵Richard Smith2014-04-251-1/+2
| | | | | | partial specialization. llvm-svn: 207260
* If we see an explicit instantiation declaration or definition of a functionRichard Smith2014-04-242-20/+27
| | | | | | | | | | | | | after we've already instantiated a definition for the function, pass it to the ASTConsumer again so that it knows the specialization kind has changed and can update the function's linkage. This only matters if we instantiate the definition of the function before we reach the end of the TU; this can happen in at least three different ways: C++11 constexpr functions, C++14 deduced return types, and functions instantiated within modules. llvm-svn: 207152
* Squelch leak found by LSan by handling missing switch case.Jordan Rose2014-04-241-2/+3
| | | | | | | | Also, use the enum type in the switch so this doesn't happen again. PR19523 llvm-svn: 207128
* Quick fix for layering that broke shared library build.John Thompson2014-04-231-27/+7
| | | | llvm-svn: 207011
* Initial implementation of -modules-earch-all option, for searching for ↵John Thompson2014-04-2312-25/+69
| | | | | | symbols in non-imported modules. llvm-svn: 206977
* PR18746: If a constexpr function has a dependent return type and no returnRichard Smith2014-04-221-2/+4
| | | | | | | | statements, don't diagnose; the return type might end up being 'void'. Patch by Rahul Jain! Tiny tweaks by me. llvm-svn: 206929
* Objective-C ARC. Under ARC, addition of 'bridge' attributeFariborz Jahanian2014-04-221-6/+14
| | | | | | | | on CF type is not sufficient and bridge casting is still required for proper ownership semantics. // rdar://16650445 llvm-svn: 206910
* [OPENMP] parsing 'linear' clause (for directive 'omp simd')Alexander Musman2014-04-222-1/+171
| | | | | | Differential Revision: http://reviews.llvm.org/D3272 llvm-svn: 206891
* Objective-C. Patch to allow use of dot syntax on classFariborz Jahanian2014-04-212-10/+6
| | | | | | | objects to fund root class's instance methods. // rdar://16650575 llvm-svn: 206781
* When a module completes the definition of a class template specialization ↵Richard Smith2014-04-191-8/+8
| | | | | | imported from another module, emit an update record, rather than using the broken decl rewriting mechanism. If multiple modules do this, merge the definitions together, much as we would if they were separate declarations. llvm-svn: 206680
* Nitpicky refactoring -- use of nullptr and auto, made a bit more ↵Aaron Ballman2014-04-171-12/+12
| | | | | | const-correct. No functional changes intended. llvm-svn: 206491
* SemaTemplate.cpp: Rework r206451. Removing an argument was really bad idea.NAKAMURA Takumi2014-04-171-4/+5
| | | | llvm-svn: 206452
* SemaTemplate.cpp: Appease msvc to get rid of default argument in lambda ↵NAKAMURA Takumi2014-04-171-2/+2
| | | | | | | | definition. clang\lib\Sema\SemaTemplate.cpp(1826) : error C2064: term does not evaluate to a function taking 1 arguments llvm-svn: 206451
* PR19340: If we see a declaration of a member of an unspecialized class templateRichard Smith2014-04-171-39/+46
| | | | | | | that looks like it might be an explicit specialization, don't recover as an explicit specialization (bypassing the check that would reject that). llvm-svn: 206444
* Refactor all the checking for missing 'template<>'s when a declaration has aRichard Smith2014-04-173-82/+85
| | | | | | template-id after its scope specifier into a single place. llvm-svn: 206442
* Don't emit an ExtWarn on declarations of variable template specializations;Richard Smith2014-04-171-6/+6
| | | | | | | we'll already have issued the relevant diagnostic when we saw the declaration of the primary template. llvm-svn: 206441
OpenPOWER on IntegriCloud