summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
Commit message (Collapse)AuthorAgeFilesLines
* Add ARM big endian Target (armeb, thumbeb)Christian Pirker2014-03-281-0/+2
| | | | | | Reviewed at http://llvm-reviews.chandlerc.com/D3096 llvm-svn: 205008
* Objective-C. Make multiple selector warningFariborz Jahanian2014-03-271-2/+2
| | | | | | | an opt-in option under -Wselector-type-mismatch. // rdar://16445728 llvm-svn: 204965
* Don't emit exit-time destructor warnings for trivial explicitly defaulted dtorsStephan Tolksdorf2014-03-271-1/+2
| | | | | | | | This commit also adds an additional test case for the global destructor warning. Reviewed in http://llvm-reviews.chandlerc.com/D3205 llvm-svn: 204954
* Enforce the restriction that a parameter to a kernel functionDavid Tweed2014-03-271-2/+15
| | | | | | | | | cannot be a pointer to the private address space (as clarified in the OpenCL 1.2 specification). Patch by Fraser Cormack! llvm-svn: 204941
* PR19252: Fix crash if alignas is used with an auto-typed variable. Don't checkRichard Smith2014-03-272-7/+3
| | | | | | the type of the variable until it's known. llvm-svn: 204887
* Objective-C. Fixes a bogus warning on unimplementedFariborz Jahanian2014-03-261-5/+9
| | | | | | | | selectors because we were not going through entire elements in list of all implemented selectors. // rdar://16428638 llvm-svn: 204852
* -Wglobal-constructors: Don't warn on trivial defaulted dtorsReid Kleckner2014-03-261-1/+1
| | | | | | Fixes PR19253. llvm-svn: 204825
* -fms-extensions: Add __va_start builtin, which is used for x64Reid Kleckner2014-03-261-0/+1
| | | | | | | | | | The main difference between __va_start and __builtin_va_start is that the address of the va_list has already been taken, and the va_list is always a char*. __va_end and __va_arg are not needed. llvm-svn: 204821
* PR19249: Don't forget to DiagnoseUseOfDecl for the implicit use of a variableRichard Smith2014-03-251-0/+2
| | | | | | in a lambda capture. llvm-svn: 204757
* -fms-compatibility: Only form implicit member exprs for unqualified idsReid Kleckner2014-03-251-5/+5
| | | | | | | | | If there are any scope specifiers, then a base class must be named or the symbol isn't from a base class. Fixes PR19233. llvm-svn: 204753
* Capability attributes can now be declared on a typedef declaration as well ↵Aaron Ballman2014-03-241-45/+60
| | | | | | as a structure declaration. This allows for C code to use Boolean expressions on a capability as part of another attribute. Eg) __attribute__((requires_capability(!SomeCapability))) llvm-svn: 204657
* Treat dllimport globals without explicit storage class as externNico Rieck2014-03-231-0/+38
| | | | | | | dllimport implies a definition which means the 'extern' keyword is optional when declaring imported variables. llvm-svn: 204576
* Cleanup dead assignments reported by scan-buildArnaud A. de Grandmaison2014-03-231-2/+0
| | | | llvm-svn: 204569
* remove a bunch of unused private methodsNuno Lopes2014-03-231-3/+0
| | | | | | | | | | | | | | | | | | found with a smarter version of -Wunused-member-function that I'm playwing with. Appologies in advance if I removed someone's WIP code. ARCMigrate/TransProperties.cpp | 8 ----- AST/MicrosoftMangle.cpp | 1 Analysis/AnalysisDeclContext.cpp | 5 --- Analysis/LiveVariables.cpp | 14 ---------- Index/USRGeneration.cpp | 10 ------- Sema/Sema.cpp | 33 +++++++++++++++++++++--- Sema/SemaChecking.cpp | 3 -- Sema/SemaDecl.cpp | 20 ++------------ StaticAnalyzer/Checkers/GenericTaintChecker.cpp | 1 9 files changed, 34 insertions(+), 61 deletions(-) llvm-svn: 204561
* Emit an update record if we instantiate the definition of a function templateRichard Smith2014-03-221-1/+3
| | | | | | | | specialization from a module. (This can also happen for function template specializations in PCHs if they're instantiated eagerly, because they're constexpr or have a deduced return type.) llvm-svn: 204547
* Refactor: move loading pending instantiations from chained PCHs to a more ↵Richard Smith2014-03-222-8/+10
| | | | | | appropriate place, so that we only ask the external source once. llvm-svn: 204535
* Be a bit smarter about what nested name qualifiers to allow whenKaelyn Uhrain2014-03-211-7/+11
| | | | | | performing typo correction on very short (1 or 2 char) identifiers. llvm-svn: 204525
* [C++11] Simplify some loops in Sema::CorrectTypo as range-based for loops.Kaelyn Uhrain2014-03-211-24/+14
| | | | llvm-svn: 204524
* Placate -Wunreachable-code by removing unnecessary logic to handle ↵Ted Kremenek2014-03-211-1/+3
| | | | | | NUM_OPENMP_DEFAULT_KINDS <= 1. llvm-svn: 204487
* The release_capability, release_shared_capability and ↵Aaron Ballman2014-03-211-1/+9
| | | | | | release_generic_capability functions are now functionally distinct for capability analysis. The unlock_function attribute maps directly to release_generic_capability. llvm-svn: 204469
* [-Wunreachable-code] add a specialized diagnostic for unreachable increment ↵Ted Kremenek2014-03-211-1/+5
| | | | | | expressions of loops. llvm-svn: 204430
* [OPENMP] parsing of clause 'safelen' (for directive 'omp simd')Alexey Bataev2014-03-212-0/+57
| | | | llvm-svn: 204428
* When the exception specification for a function in an imported PCH or module isRichard Smith2014-03-203-23/+29
| | | | | | resolved, emit an update record. llvm-svn: 204403
* Replacing the exclusive_lock_function, shared_lock_function and ↵Aaron Ballman2014-03-202-74/+7
| | | | | | | | unlock_function attributes with the acquire_capability and release_capability attributes. The old spellings will continue to work, but the underlying semantic attributes have been replaced. Downgraded the capability diagnostics from error to warning to match the desired behavior, and updated the existing test cases. llvm-svn: 204350
* [-Wunreachable-code] Simplify and broad -Wunreachable-code-return, including ↵Ted Kremenek2014-03-201-1/+1
| | | | | | | | | | | | | | | | | nontrivial returns. The exception is return statements that include control-flow, which are clearly doing something "interesting". 99% of the cases I examined for -Wunreachable-code that fired on return statements were not interesting enough to warrant being in -Wunreachable-code by default. Thus the move to include them in -Wunreachable-code-return. This simplifies a bunch of logic, including removing the ad hoc logic to look for std::string literals. llvm-svn: 204307
* scanf format checking: include the buffer length in the fix-it for %s.Jordan Rose2014-03-201-2/+3
| | | | | | Patch by Zach Davis! llvm-svn: 204300
* Objective-C. Better fix for my previous patch Fariborz Jahanian2014-03-181-12/+7
| | | | | | | | | "No need to issue deprecated warning if deprecated method in class extension is being implemented in primary class implementation (no overriding is involved). // rdar://16249335". No functionality change. llvm-svn: 204159
* [OPENMP] DSA fixAlexey Bataev2014-03-181-1/+16
| | | | llvm-svn: 204143
* [OPENMP] Simplified data-sharing attributes analysis.Alexey Bataev2014-03-181-16/+1
| | | | llvm-svn: 204135
* Objective-C. No need to issue deprecated warning if deprecated method Fariborz Jahanian2014-03-181-2/+12
| | | | | | | | in class extension is being implemented in primary class implementation (no overriding is involved). // rdar://16249335 llvm-svn: 204093
* Objective-C. Consider blocks for designated initializerFariborz Jahanian2014-03-171-6/+10
| | | | | | | | warnings (warning or lack there of) as well since blocks are another pattern for envoking other designated initializers. // rdar://16323233 llvm-svn: 204081
* Objective-C. Do not warn when an instance method andFariborz Jahanian2014-03-171-1/+3
| | | | | | | | class method with the same selctor but different argument types having one of them in class extension. // rdar://16312105 llvm-svn: 204065
* [C++11] Replacing DeclContext iterators using_directives_begin() and ↵Aaron Ballman2014-03-171-9/+7
| | | | | | using_directives_end() with iterator_range using_directives(). Updating all of the usages of the iterators with range-based for loops, and removing the no-longer-needed iterator versions. Also used as an opportunity to normalize the name from getUsingDirectives() to using_directives(). llvm-svn: 204061
* [C++11] Replacing Scope iterators using_directives_begin() and ↵Aaron Ballman2014-03-171-4/+2
| | | | | | using_directives_end() with iterator_range using_directives(). Updating all of the usages of the iterators with range-based for loops, and removing the no-longer-needed iterator versions. llvm-svn: 204053
* [C++11] Replacing Scope iterators decl_begin() and decl_end() with ↵Aaron Ballman2014-03-173-9/+5
| | | | | | iterator_range decls(). Updating all of the usages of the iterators with range-based for loops, and removing the no-longer-needed iterator versions. llvm-svn: 204052
* [C++11] Replacing ObjCObjectPointerType iterators qual_begin() and ↵Aaron Ballman2014-03-174-30/+16
| | | | | | qual_end() with iterator_range quals(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 204048
* [C++11] Replacing ObjCObjectType iterators qual_begin() and qual_end() with ↵Aaron Ballman2014-03-172-6/+4
| | | | | | iterator_range quals(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 204047
* [C++11] Replacing FunctionProtoType iterators exception_begin() and ↵Aaron Ballman2014-03-172-27/+15
| | | | | | exception_end() with iterator_range exceptions(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 204046
* [C++11] Replacing FunctionProtoType iterators param_type_begin() and ↵Aaron Ballman2014-03-175-36/+16
| | | | | | param_type_end() with iterator_range param_types(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 204045
* [C++11] Replacing CompoundStmt iterators body_begin() and body_end() with ↵Aaron Ballman2014-03-172-11/+8
| | | | | | iterator_range body(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 204040
* PR19152: If a variable template's type involves 'auto', instantiate theRichard Smith2014-03-161-2/+5
| | | | | | initializer with the variable in order to determine the type. llvm-svn: 204015
* Further refine -Wunreachable-code groups so that -Wno-unreachable-code-break ↵Ted Kremenek2014-03-151-10/+19
| | | | | | | | | | doesn't turn off all unreachable code warnings. Also relax unreachable 'break' and 'return' to not check for being preceded by a call to 'noreturn'. That turns out to not be so interesting in practice. llvm-svn: 204000
* Start breaking -Wunreachable-code up into different diagnostic groups.Ted Kremenek2014-03-151-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent work on -Wunreachable-code has focused on suppressing uninteresting unreachable code that center around "configuration values", but there are still some set of cases that are sometimes interesting or uninteresting depending on the codebase. For example, a dead "break" statement may not be interesting for a particular codebase, potentially because it is auto-generated or simply because code is written defensively. To address these workflow differences, -Wunreachable-code is now broken into several diagnostic groups: -Wunreachable-code: intended to be a reasonable "default" for most users. and then other groups that turn on more aggressive checking: -Wunreachable-code-break: warn about dead break statements -Wunreachable-code-trivial-return: warn about dead return statements that return "trivial" values (e.g., return 0). Other return statements that return non-trivial values are still reported under -Wunreachable-code (this is an area subject to more refinement). -Wunreachable-code-aggressive: supergroup that enables all these groups. The goal is to eventually make -Wunreachable-code good enough to either be in -Wall or on-by-default, thus finessing these warnings into different groups helps achieve maximum signal for more users. TODO: the tests need to be updated to reflect this extra control via diagnostic flags. llvm-svn: 203994
* Objective-C. Redo turning off designated initialization warnings onFariborz Jahanian2014-03-142-10/+12
| | | | | | | | 'init' methods which are unavailable. Subclasses of NSObject have to implement such methods as a common pattern to prevent user's own implementation. // rdar://16305460 llvm-svn: 203984
* Call RequireCompleteType when performing ADL even if the type is alreadyRichard Smith2014-03-141-6/+8
| | | | | | | | complete. We hook into this check from a couple of other places (modules, debug info) so it's not OK to elide the check if the type was already complete. llvm-svn: 203978
* [C++11] Removing the found_decls_begin() and found_decls_end() APIs and ↵Aaron Ballman2014-03-141-3/+2
| | | | | | replacing with a range-only found_decls() API. llvm-svn: 203975
* Add two missing entries to the C++11 support page. Bump one relevant diagnosticRichard Smith2014-03-141-1/+1
| | | | | | | | (for an integer too large for any signed type) from Warning to ExtWarn -- it's ill-formed in C++11 and C99 onwards, and UB during translation in C89 and C++98. Add diagnostic groups for two relevant diagnostics. llvm-svn: 203974
* [C++11] Removing the types_begin() and types_end() APIs and replacing with a ↵Aaron Ballman2014-03-141-4/+2
| | | | | | range-only types() API. llvm-svn: 203971
* Objective-C. Turn off designated initialization warnings onFariborz Jahanian2014-03-141-2/+5
| | | | | | | | 'init' methods which are unavailable. Subclasses of NSObject have to implement such methods as a common pattern to prevent user's own implementation. // rdar://16305460 llvm-svn: 203966
* [C++11] Replacing BlockDecl iterators capture_begin() and capture_end() with ↵Aaron Ballman2014-03-143-10/+6
| | | | | | iterator_range captures(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203958
OpenPOWER on IntegriCloud