summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Diagnose ref-qualifiers occuring after virt-specifier-seq and generate fixit ↵Ehsan Akhgari2015-03-244-11/+46
| | | | | | | | | | | | | | hints Summary: Follow-up to the fix of PR22075. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D7012 llvm-svn: 233070
* Diagnose declspecs occuring after virt-specifier-seq and generate fixit hintsEhsan Akhgari2015-03-247-3/+73
| | | | | | | | | | | | Summary: This fixes PR22075. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6828 llvm-svn: 233069
* [analyzer] Remove unused function. No functional change intended.Benjamin Kramer2015-03-241-11/+0
| | | | llvm-svn: 233060
* Make header standalone, it uses memset and memcmp.Benjamin Kramer2015-03-241-0/+1
| | | | | | NFC. llvm-svn: 233059
* Silence unused warning in non-assert builds.Daniel Jasper2015-03-241-0/+1
| | | | llvm-svn: 233053
* [modules] Deserialize CXXCtorInitializer list for a constructor lazily.Richard Smith2015-03-2418-138/+360
| | | | | | | | | | | | | Previously we'd deserialize the list of mem-initializers for a constructor when we deserialized the declaration of the constructor. That could trigger a significant amount of unnecessary work (pulling in all base classes recursively, for a start) and was causing problems for the modules buildbot due to cyclic deserializations. We now deserialize these on demand. This creates a certain amount of duplication with the handling of CXXBaseSpecifiers; I'll look into reducing that next. llvm-svn: 233052
* A couple of readASTFileSignature improvements (NFC)Ben Langmuir2015-03-243-22/+18
| | | | | | | | | | * Strength reduce a std::function to a function pointer, * Factor out checking the AST file magic number, * Add a brief doc comment to readAStFileSignature Thanks to Chandler for spotting these oddities. llvm-svn: 233050
* [modules] More removal of unnecessary deserialization of lexical decls.Richard Smith2015-03-241-2/+0
| | | | | | | | Even if we have no external visible declarations, we may still have external lexical decls that lookup() would import to fill its lookup table. It's simpler and faster to always take the no-deserialization path through noload_lookup. llvm-svn: 233046
* When looking for lexical decls from an external source, check all contextsRichard Smith2015-03-242-16/+22
| | | | | | | | rather than just the primary context. This is technically correct but results in no functionality change (in Clang nor LLDB) because all users of this functionality only use it on single-context DCs. llvm-svn: 233045
* Cleanup: no need to pass DefinitionKind into ParseCXXInlineMethodDefEli Bendersky2015-03-233-7/+5
| | | | | | | | | | All ParseCXXInlineMethodDef does with it is assign it on the ParsingDeclarator. Since that is passed in as well, the (single) caller may as well set the DefinitionKind, thus simplifying the code. No change in functionality. llvm-svn: 233043
* [UBSan] Use shared library for UBSan on OS X (Clang part).Alexey Samsonov2015-03-234-39/+44
| | | | | | | | | | | | | | | | | | Summary: UBSan is now used in the same way as ASan, and is supported on OSX and on iOS simulator. At the moment ASan and UBSan can't be used together due to PR21112, but I hope to resolve it soon by embedding UBSan into ASan. Test Plan: regression test suite. Reviewers: zaks.anna, kubabrecka Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D8471 llvm-svn: 233035
* Record correct source range for defaulted/deleted members.Eli Bendersky2015-03-234-12/+30
| | | | | | | | | | | | | | | | | | | Fixes https://llvm.org/bugs/show_bug.cgi?id=20744 struct A { A() = default; }; Previously the source range of the declaration of A ended at the ')'. It should include the '= default' part as well. The same for '= delete'. Note: this will break one of the clang-tidy fixers, which is going to be addessed in a follow-up patch. Differential Revision: http://reviews.llvm.org/D8465 llvm-svn: 233028
* MS ABI: lambda call operators are instance methods and should use thiscallReid Kleckner2015-03-233-8/+28
| | | | | | Fixes an issue reported by Daniel Berenyi on cfe-dev. llvm-svn: 233023
* [SDK modernizer PATCH]. Fixes a bug whereby a call to superFariborz Jahanian2015-03-233-8/+21
| | | | | | | was not converted to property-dot syntax by removing an unused code. rdar://19140267 llvm-svn: 233019
* [cmake] Clang's install should install clang/Config/config.hChris Bieneman2015-03-231-0/+1
| | | | llvm-svn: 233016
* Adds a warning for unrecognized argument to #pragma comment() on PS4.Yunzhong Gao2015-03-234-9/+46
| | | | | | | | | | | PS4 target recognizes the #pragma comment() syntax as in -fms-extensions, but only handles the case of #pragma comment(lib). This patch adds a warning if any other arguments are encountered. This patch also refactors the code in ParsePragma.cpp a little bit to make it more obvious that some codes are being shared between -fms-extensions and PS4. llvm-svn: 233015
* [UBSan] Introduce "ubsan_standalone" library (Clang part).Alexey Samsonov2015-03-232-29/+17
| | | | | | | | | | | | Get rid of "libclang_rt.san" library that used to contain sanitizer_common pieces required by UBSan if it's used in a standalone mode. Instead, build two variants of UBSan runtime: "ubsan" and "ubsan_standalone" (same for "ubsan_cxx" and "ubsan_standalone_cxx"). Later "ubsan" and "ubsan_cxx" libraries will go away, as they will embedded it into corresponding ASan runtimes. llvm-svn: 233010
* [modules] Fix an iterator invalidation bug found by the modules selfhost bot.Richard Smith2015-03-231-4/+8
| | | | llvm-svn: 233007
* Make Oveflow tracking more legible (CR feedback from Richard Smith on r232999)David Blaikie2015-03-231-1/+2
| | | | llvm-svn: 233006
* Refactor: Simplify boolean expresssions in lib/LexDavid Blaikie2015-03-231-1/+1
| | | | | | | | | | Simplify boolean expressions using `true` and `false` with `clang-tidy` Patch by Richard Thomson. Differential Revision: http://reviews.llvm.org/D8531 llvm-svn: 232999
* Fix and update comments and a small reformatting.Eric Christopher2015-03-231-4/+3
| | | | llvm-svn: 232997
* Refactor: Simplify boolean expressions in libclangDmitri Gribenko2015-03-231-1/+1
| | | | | | | | Simplify boolean expresions using true and false with clang-tidy. Patch by Richard. llvm-svn: 232996
* Explicitly include raw_ostream.h instead of relying on transitive inclusion.Benjamin Kramer2015-03-231-0/+1
| | | | | | NFC. llvm-svn: 232975
* [CodeGen] Properly support the half FP type with non-native operations.Ahmed Bougacha2015-03-232-168/+208
| | | | | | | | | | | | | | | | | | | | | | On AArch64, the -fallow-half-args-and-returns option is the default. With it, the half type is considered legal (rather than the i16 used normally for __fp16), but no operation is, except conversions and load/stores and such. The previous behavior was tantamount to saying LangOpts.NativeHalfType was implied by LangOpts.HalfArgsAndReturns, which isn't true. Instead, teach the various parts of CodeGen that already know about half (using the intrinsics or not) about this weird in-between case, where the "half" type is legal, but operations on it aren't. This is a smaller intermediate step to the end-goal of removing the intrinsic, always using "half", and letting the backend legalize. Builds on r232968. rdar://20045970, rdar://17468714 Differential Revision: http://reviews.llvm.org/D8367 llvm-svn: 232971
* [CodeGen] Convert double -> __fp16 in one step.Ahmed Bougacha2015-03-232-14/+39
| | | | | | | | | | | | | | Fix the CodeGen so that for types bigger than float, instead of converting to fp16 via the sequence "InTy -> float -> fp16", we perform conversions in just one step. This avoids the double rounding which potentially changes results from a natural IEEE-754 operation. rdar://17594379, rdar://17468714 Differential Revision: http://reviews.llvm.org/D4602 Part of: http://reviews.llvm.org/D8367 llvm-svn: 232968
* OpenMPClause.h: Fix typo in \param. [-Wdocumentation]NAKAMURA Takumi2015-03-231-1/+1
| | | | llvm-svn: 232956
* [tooling] Move ArgumentsAdjustingCompilations into an anonymous namespace.Benjamin Kramer2015-03-231-0/+2
| | | | | | NFC. llvm-svn: 232947
* Move private classes into anonymous namespacesBenjamin Kramer2015-03-233-88/+5
| | | | | | Also merge anonymous namespaces in Targets.cpp a bit. NFC. llvm-svn: 232945
* handle armeb/thumb/thumbeb consistently in gnutools::Assemble::ConstructJobScott Douglass2015-03-232-5/+55
| | | | | | Differential Revision: http://reviews.llvm.org/D8196 llvm-svn: 232940
* Convert cascading if-else-if to switch. NFCScott Douglass2015-03-231-14/+32
| | | | | | Differential Revision: http://reviews.llvm.org/D8485 llvm-svn: 232939
* [OPENMP] Fixed test for 'single' directive codegen.Alexey Bataev2015-03-231-1/+1
| | | | llvm-svn: 232933
* [OPENMP] Codegen for 'copyprivate' clause ('single' directive).Alexey Bataev2015-03-2315-60/+471
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If there is at least one 'copyprivate' clause is associated with the single directive, the following code is generated: ``` i32 did_it = 0; \\ for 'copyprivate' clause if(__kmpc_single(ident_t *, gtid)) { SingleOpGen(); __kmpc_end_single(ident_t *, gtid); did_it = 1; \\ for 'copyprivate' clause } <copyprivate_list>[0] = &var0; ... <copyprivate_list>[n] = &varn; call __kmpc_copyprivate(ident_t *, gtid, <copyprivate_list_size>, <copyprivate_list>, <copy_func>, did_it); ... void<copy_func>(void *LHSArg, void *RHSArg) { Dst = (void * [n])(LHSArg); Src = (void * [n])(RHSArg); Dst[0] = Src[0]; ... Dst[n] = Src[n]; } ``` All list items from all 'copyprivate' clauses are gathered into single <copyprivate list> (<copyprivate_list_size> is a size in bytes of this list) and <copy_func> is used to propagate values of private or threadprivate variables from the 'single' region to other implicit threads from outer 'parallel' region. Differential Revision: http://reviews.llvm.org/D8410 llvm-svn: 232932
* Revert "Add CodeGen support for adding cpu attributes on functions based on"Daniel Jasper2015-03-232-42/+0
| | | | | | | This breaks CodeGen for an internal target. I'll get repro instructions to you. llvm-svn: 232930
* [modules] Remove redundant import of lexical decls when building a lookup tableRichard Smith2015-03-2319-169/+257
| | | | | | | | | | | | | | | for a DeclContext, and fix propagation of exception specifications along redeclaration chains. This reverts r232905, r232907, and r232907, which reverted r232793, r232853, and r232853. One additional change is present here to resolve issues with LLDB: distinguish between whether lexical decls missing from the lookup table are local or are provided by the external AST source, and still look in the external source if that's where they came from. llvm-svn: 232928
* [ASTMatchers] Factor wrapping matcher classes into a common base class.Benjamin Kramer2015-03-221-86/+76
| | | | | | | | The deduplication here is negligible, but it allows the compiler to skip emission of many templated base class destructors. Shrinks clang-query by 53k. No functionality change intended. llvm-svn: 232924
* [Analyzer] Don't inherit from FoldingSet.Benjamin Kramer2015-03-222-5/+9
| | | | | | That's not really necessary here. NFCI. llvm-svn: 232921
* Update unit test for r232916.Benjamin Kramer2015-03-221-7/+3
| | | | llvm-svn: 232918
* [multilib] Turn virtual functor into functin_refBenjamin Kramer2015-03-223-99/+57
| | | | | | And update code to use lambdas where possible, plus random cleanup. NFCI. llvm-svn: 232916
* Add a dump function to Stmt that takes only an output stream. No ↵Faisal Vali2015-03-222-0/+6
| | | | | | | | | | functionality change. This allows dumping to any given output stream but without requiring a SourceManager, similar to the interface provided by Decl. It's useful when writing certain generic debug functions, external to the clang code base (for e.g.). llvm-svn: 232912
* Remove empty files left behind by r232907.Benjamin Kramer2015-03-225-0/+0
| | | | llvm-svn: 232909
* Reverting 232853 and 232870 because they depend on 232793,Vince Harron2015-03-2211-121/+70
| | | | | | which was reverted because it was causing LLDB test failures llvm-svn: 232907
* MS ABI: Implement driver-level support for thread-safe staticsDavid Majnemer2015-03-227-87/+105
| | | | | | | | | | | Decide whether or not to use thread-safe statics depending on whether or not we have an explicit request from the driver. If we don't have an explicit request, infer which behavior to use depending on the compatibility version we are targeting. N.B. CodeGen support is still ongoing. llvm-svn: 232906
* Reverting r232793 until some new LLDB failures are discussedVince Harron2015-03-229-62/+62
| | | | llvm-svn: 232905
* -Wdynamic-class-memaccess: Also warn about array types.Nico Weber2015-03-213-1/+9
| | | | | | | It looks like not warning on this was an oversight in the original implementation of this warning. llvm-svn: 232900
* Dedent code for -Wdynamic-class-memaccess warning. No behavior change.Nico Weber2015-03-211-39/+44
| | | | | | | | | | | | The diff looks intimidating, but this just moves the -Wdynamic-class-memaccess code out a scope, protected by a if (PointeeTy == QualType()) continue; check so that it still only runs when it should. llvm-svn: 232899
* Small test fix for r232890Alexander Musman2015-03-211-1/+1
| | | | llvm-svn: 232893
* [OPENMP] CodeGen of the 'linear' clause for the 'omp simd' directive.Alexander Musman2015-03-2112-23/+446
| | | | | | | | | The linear variable is privatized (similar to 'private') and its value on current iteration is calculated, similar to the loop counter variables. Differential revision: http://reviews.llvm.org/D8375 llvm-svn: 232890
* Add CodeGen support for adding cpu attributes on functions based onEric Christopher2015-03-212-0/+42
| | | | | | | | | | | | | the target-cpu, if different from the triple's cpu, and target-features as they're written that are passed down from the driver. Together with LLVM r232885 this should allow the LTO'ing of binaries that contain modules compiled with different code generation options on a subset of architectures with full backend support (x86, powerpc, aarch64). llvm-svn: 232888
* [modules] When either redecl chain merging or an update record causes us toRichard Smith2015-03-2110-64/+99
| | | | | | | | | give an exception specification to a declaration that didn't have an exception specification in any of our imported modules, emit an update record ourselves. Without this, code importing the current module would not see an exception specification that we could see and might have relied on. llvm-svn: 232870
* Only add -fno-rtti if KernelOrKext or in C++ mode.Filipe Cabecinhas2015-03-202-5/+9
| | | | llvm-svn: 232869
OpenPOWER on IntegriCloud