summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Add hasLocalStorage/hasGlobalStorage matchers.Samuel Benzaquen2014-06-054-0/+68
| | | | | | | | | | | | | | Summary: Add hasLocalStorage/hasGlobalStorage matchers for VarDecl nodes. Update the doc. Also add them to the dynamic registry. Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D4034 llvm-svn: 210278
* Fix bot for named register testRenato Golin2014-06-051-1/+1
| | | | llvm-svn: 210275
* Add pointer types to global named registerRenato Golin2014-06-055-5/+61
| | | | | | | | | | This patch adds support for pointer types in global named registers variables. It'll be lowered as a pair of read/write_register and inttoptr/ptrtoint calls. Also adds some early checks on types on SemaDecl to avoid the assert. Tests changed accordingly. (PR19837) llvm-svn: 210274
* [mips] Add macros _MIPS_ISA and __mips_isa_rev (same expansion as defined by ↵Matheus Almeida2014-06-052-1/+28
| | | | | | | | | | | | | | GCC). Summary: The Linux Kernel is one example of a piece of software that relies on them. Reviewers: atanasyan Reviewed By: atanasyan Differential Revision: http://reviews.llvm.org/D3756 llvm-svn: 210270
* Fix equalsNode() to accept pointers to derived types.Samuel Benzaquen2014-06-053-43/+29
| | | | | | | | | | | | | | | Summary: Move the 'const' in the AST_*MATCHER_P* macros to the right of ParamType to avoiad applying the constness on the wrong level when ParamType is a pointer. Change equalsNode() to explicitly accept 'const Decl*' or 'const Stmt*'. Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D3994 llvm-svn: 210269
* Fix driver warning about -pthread on Android.Evgeniy Stepanov2014-06-052-3/+9
| | | | | | -pthread is no-op on Android. Suppress the unused argument warning. llvm-svn: 210253
* Fix driver warning about -shared-libasan on Android.Evgeniy Stepanov2014-06-052-2/+10
| | | | | | | Asan runtime library is always shared on Android, and -shared-libasan is no-op. Suppress the unused argument warning. llvm-svn: 210252
* XCore target: Fix 'typestring' binding qualifier to the array and not the typeRobert Lytton2014-06-052-16/+21
| | | | | | Differential Revision: http://reviews.llvm.org/D3949 llvm-svn: 210250
* Changing this line of code back to the way it was before Alp's config.h ↵Puyan Lotfi2014-06-051-0/+1
| | | | | | | | | clean up changes. I've already spoken to Alp and he signed off on making this one change, so that our buildbots go green in the short term. llvm-svn: 210238
* Bugfix: don't assert if someone manages to declare an operator new/delete ↵Richard Smith2014-06-052-3/+6
| | | | | | template before the builtin operator new/delete. llvm-svn: 210230
* Flush C stdio streams upon process terminationReid Kleckner2014-06-052-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to what can only be described as a CRT bug, stdout and amazingly even stderr are not always flushed upon process termination, especially when the system is under high threading pressure. I have found two repros for this: 1) In lib\Support\Threading.cpp, change sys::Mutex to an std::recursive_mutex and run check-clang. Usually between 30 and 40 tests will fail. 2) Add OutputDebugStrings in code that runs during static initialization and static shutdown. This will sometimes generate similar failures. After a substantial amount of troubleshooting and debugging, I found that I could reproduce this from the command line without running check-clang. Simply make the mutex change described in #1, then manually run the following command many times by running it once, then pressing Up -> Enter very quickly: D:\src\llvm\build\vs2013\Debug\bin\c-index-test.EXE -cursor-at=D:\src\llvm\tools\clang\test\Index\targeted-preamble.h:2:15 D:\src\llvm\tools\clang\test\Index\targeted-cursor.c -include D:\src\llvm\build\vs2013\tools\clang\test\Index\Output\targeted-cursor.c.tmp.h -Xclang -error-on-deserialized-decl=NestedVar1 -Xclang -error-on-deserialized-decl=TopVar | D:\src\llvm\build\vs2013\Debug\bin\FileCheck.EXE D:\src\llvm\tools\clang\test\Index\targeted-cursor.c -check-prefix=PREAMBLE-CURSOR1 Sporadically they will fail, and attaching a debugger to a failed instance indicates that stdin of FileCheck.exe is empty. Note that due to the repro in #2, we can rule out a bug in the STL's mutex implementation, and instead conclude that this is a real flake in the windows test harness. Test Plan: Without patch: Ran check-clang 10 times and saw over 30 Unexpected failures on every run. With patch: Ran check-clang 10 times and saw 0 unexpected failures across all runs. Reviewers: rnk Differential Revision: http://reviews.llvm.org/D4021 Patch by Zachary Turner! llvm-svn: 210225
* [ubsan] Don't add a --dynamic-list for ubsan symbols when building a sharedRichard Smith2014-06-042-2/+16
| | | | | | | | | library. That results in the linker resolving all references to weak symbols in the DSO to the definition from within that DSO. Ironically, this rarely causes observable problems, except that it causes ubsan's own dynamic type check to spuriously fail (because we fail to properly merge type_info object names). llvm-svn: 210220
* Formatting cleanup.Richard Smith2014-06-041-10/+9
| | | | llvm-svn: 210219
* Don't dynamically initialize dllimport vars (PR19933)Hans Wennborg2014-06-042-10/+38
| | | | | | | | They should be initialized when they're exported. Differential Revision: http://reviews.llvm.org/D4020 llvm-svn: 210217
* Remove the overload of GetAddrOfConstantString methodAlexey Samsonov2014-06-043-41/+11
| | | | llvm-svn: 210214
* Refactor and generalize GetAddrOfConstantString and ↵Alexey Samsonov2014-06-042-95/+87
| | | | | | | | | | | | | GetAddrOfConstantStringFromLiteral. Share mode code between these functions and re-structure them in a way which shows how similar they actually are. The latter function works well with literals of multi-byte chars and does a GlobalVariable name mangling (if global strings are non-writable). No functionality change. llvm-svn: 210212
* This cast is not necessary any more (llvm api change).Rafael Espindola2014-06-041-1/+1
| | | | llvm-svn: 210206
* Update for llvm api change.Rafael Espindola2014-06-043-4/+4
| | | | llvm-svn: 210204
* MS-ABI: Mangle empty template parameter packs correctlyDavid Majnemer2014-06-042-4/+15
| | | | | | Tested for compatibility with VS2013. llvm-svn: 210198
* MS-ABI: Implement user defined literalsDavid Majnemer2014-06-042-5/+5
| | | | | | | | | Straightforward implementation of UDLs, it's compatible with VS "14". This nearly completes our implementation of C++ name mangling for the MS-ABI. llvm-svn: 210197
* [OPENMP] Parsing/Sema for OMPLasprivateClause.Alexander Musman2014-06-0420-11/+565
| | | | | | Parsing this clause, allowing it on directive ‘omp simd’ and semantic checks. llvm-svn: 210184
* clang-format: Leave empty lines within UnwrappedLines.Daniel Jasper2014-06-043-10/+28
| | | | | | | | These are commonly used to structure things like enums or long braced lists. There doesn't seem to be a good reason to have the behavior in such structures be different from the behavior between statements. llvm-svn: 210183
* [OPENMP] Small comment and reformatting fixes.Alexander Musman2014-06-043-80/+70
| | | | | | | | | Fix post-commit review comments by Carlo Bertolli for commit r209660 - OMP collapse clause. Re-formatted TransformOMP* functions in TreeTransform.h with clang-format. llvm-svn: 210169
* Remove the last remaining llvm/Config/config.h includesAlp Toker2014-06-0416-24/+25
| | | | | | | | | | | | This corrects long-standing misuses of LLVM's internal config.h. In most cases the public llvm-config.h header was intended and we can now remove the old hacks thanks to LLVM r210144. The config.h header is private, won't be installed and should no longer be included by clang or other modules. llvm-svn: 210145
* Downgrade "definition of dllimport static field" error to warning for class ↵Hans Wennborg2014-06-044-14/+42
| | | | | | | | | | | | | | | | | | | templates (PR19902) This allows us to compile the following kind of code, which occurs in MSVC headers: template <typename> struct S { __declspec(dllimport) static int x; }; template <typename T> int S<T>::x; The definition works similarly to a dllimport inline function definition and gets available_externally linkage. Differential Revision: http://reviews.llvm.org/D3998 llvm-svn: 210141
* Add __builtin_operator_new and __builtin_operator_delete, which act like callsRichard Smith2014-06-039-3/+79
| | | | | | | to the normal non-placement ::operator new and ::operator delete, but allow optimizations like new-expressions and delete-expressions do. llvm-svn: 210137
* Update DR page for latest revision of CWG issues list.Richard Smith2014-06-031-28/+424
| | | | llvm-svn: 210130
* Fix leak from r210059Alp Toker2014-06-034-4/+11
| | | | | | | Also revert r210096 which temporarily disabled the test while this was being investigated. llvm-svn: 210115
* Use IntrusiveRefCntPtr's == and != nullptr operators.Rafael Espindola2014-06-031-8/+8
| | | | | | This is a partial revert of r210075. llvm-svn: 210101
* clang-format: Refactor indentation behavior for multiple nested blocks.Daniel Jasper2014-06-035-33/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a few oddities when formatting multiple nested JavaScript blocks, e.g.: Before: promise.then( function success() { doFoo(); doBar(); }, [], function error() { doFoo(); doBaz(); }); promise.then([], function success() { doFoo(); doBar(); }, function error() { doFoo(); doBaz(); }); After: promise.then( function success() { doFoo(); doBar(); }, [], function error() { doFoo(); doBaz(); }); promise.then([], function success() { doFoo(); doBar(); }, function error() { doFoo(); doBaz(); }); llvm-svn: 210097
* temporary disable part of a test because it causes clang to leak memory ↵Kostya Serebryany2014-06-031-2/+3
| | | | | | (want to have the sanitizer bot green) llvm-svn: 210096
* [OPENMP] Loop canonical form analysis (Sema)Alexander Musman2014-06-0311-25/+1170
| | | | | | | | | This patch implements semantic analysis to make sure that the loop is in OpenMP canonical form. This is the form required for 'omp simd', 'omp for' and other loop pragmas. Differential revision: http://reviews.llvm.org/D3778 llvm-svn: 210095
* Remove incorrect assertion.Richard Smith2014-06-032-4/+10
| | | | llvm-svn: 210092
* Implement DR990 and DR1070. Aggregate initialization initializes uninitializedRichard Smith2014-06-0311-96/+244
| | | | | | | | | elements from {}, rather than value-initializing them. This permits calling an initializer-list constructor or constructing a std::initializer_list object. (It would also permit initializing a const reference or rvalue reference if that weren't explicitly prohibited by other rules.) llvm-svn: 210091
* Teach AST dumper to dump the array filler in an initializer list.Richard Smith2014-06-031-0/+17
| | | | llvm-svn: 210090
* PR11410: Extend diagnostic to cover all cases of aggregate initialization, notRichard Smith2014-06-035-15/+39
| | | | | | | | | | just the extremely specific case of a trailing array element that couldn't be initialized because the default constructor for the element type is deleted. Also reword the diagnostic to better match our other context diagnostics and to prepare for the implementation of core issue 1070. llvm-svn: 210083
* List DR532 as implemented on the defect report status page by renaming the ↵Nikola Smiljanic2014-06-031-2/+2
| | | | | | namespace. llvm-svn: 210080
* When emitting a multidimensional array new, emit the initializers for theRichard Smith2014-06-034-156/+260
| | | | | | | | | trailing elements as a single loop, rather than sometimes emitting a nest of several loops. This fixes a bug where CodeGen would sometimes try to emit an expression with the wrong type for the element being initialized. Plus various other minor cleanups to the IR produced for array new initialization. llvm-svn: 210079
* Don't assume an implicit IntrusiveRefCntPtr -> bool operator.Rafael Espindola2014-06-032-9/+9
| | | | llvm-svn: 210075
* Move DR532 test where it belongs.Nikola Smiljanic2014-06-032-16/+16
| | | | llvm-svn: 210064
* Update for llvm API change.Rafael Espindola2014-06-0310-65/+71
| | | | | | Aliases in llvm now hold an arbitrary expression. llvm-svn: 210063
* Fix -emit-codegen-only to not generate binariesAlp Toker2014-06-032-0/+8
| | | | llvm-svn: 210059
* Eliminate redundant MangleBuffer classAlp Toker2014-06-035-43/+13
| | | | | | | | | The only remaining user didn't actually use the non-dynamic storage facility this class provides. The std::string is transitional and likely to be StringRefized shortly. llvm-svn: 210058
* Itanium ABI: Update getAddrOfVTable to set the DLL storage class for vtablesHans Wennborg2014-06-023-5/+26
| | | | | | | | This corresponds to the same change for the MS ABI in r209908. Differential Revision: http://reviews.llvm.org/D3993 llvm-svn: 210054
* allow optional signext attributeWill Schmidt2014-06-023-10/+10
| | | | | | | Allow the tests to succeed with tne signext (or other) attribute is present. The attributes show up for Power, but not for x86*, so need to be appropriately wildcarded. llvm-svn: 210050
* Delete apparently unused methodAlexey Samsonov2014-06-022-29/+0
| | | | llvm-svn: 210047
* [CodeGen] Don't use SizeTy for EmitNeonSplat.Michael J. Spencer2014-06-021-1/+1
| | | | llvm-svn: 210042
* Remove unused variableAlexey Samsonov2014-06-021-2/+0
| | | | llvm-svn: 210041
* Fix comment vs function name mismatchHans Wennborg2014-06-021-1/+1
| | | | llvm-svn: 210039
* Remove sanitizer blacklist from ASan/TSan/MSan function passes.Alexey Samsonov2014-06-021-9/+5
| | | | | | | | | | | | | | | | | Instrumentation passes now use attributes address_safety/thread_safety/memory_safety which are added by Clang frontend. Clang parses the blacklist file and adds the attributes accordingly. Currently blacklist is still used in ASan module pass to disable instrumentation for certain global variables. We should fix this as well by collecting the set of globals we're going to instrument in Clang and passing it to ASan in metadata (as we already do for dynamically-initialized globals and init-order checking). This change also removes -tsan-blacklist and -msan-blacklist LLVM commandline flags in favor of -fsanitize-blacklist= Clang flag. llvm-svn: 210037
OpenPOWER on IntegriCloud