summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Refactor: use the DeclarationNameInfo form of BuildMemberReferenceExprRichard Smith2014-05-313-212/+162
| | | | | | | consistently, rather than sometimes performing lookup and calling the LookupResult form. No functionality change intended. llvm-svn: 209941
* cc1as: invert return bool to indicate failureAlp Toker2014-05-311-20/+13
| | | | | | | | This simplifies code flow and matches the convention used in surrounding code. No functional change. llvm-svn: 209936
* cc1as: fix a potential leak and unremoved output file in error conditionsAlp Toker2014-05-311-13/+17
| | | | llvm-svn: 209935
* Take PrintingPolicy::SuppressUnwrittenScope into account when printing theRichard Smith2014-05-303-0/+137
| | | | | | qualified name of a NamedDecl. Patch by Volodymyr Sapsai! llvm-svn: 209924
* Invalidate the file system cache entries for files that may rebuildBen Langmuir2014-05-301-5/+21
| | | | | | | | | | | | | | | | | | | | | | This reapplies r209910 with a fix for the assertion failures hit on the buildbots. original commit message: I thought we could get away without this, but it means that the FileEntry objects actually refer to the wrong files, since pcms are not updated inplace, they are atomically renamed into place after compiling a module. So we are close to the original behaviour of invalidating the cache for all modules being removed, but now we should only invalidate the ones that depend on whichever module failed to load. Unfortunately I haven't come up with a new test that didn't require a race between parallel invocations of clang. <rdar://problem/17038180> llvm-svn: 209922
* Remove unused struct from testAlp Toker2014-05-301-11/+0
| | | | | | This presumably got inadvertently copied from dllimport-members.cpp. llvm-svn: 209919
* Add a FIXME for a bug Doug pointed out in code review.Richard Smith2014-05-301-0/+4
| | | | llvm-svn: 209915
* Thread Safety Analysis: fix handling of string and char literals.DeLesley Hutchins2014-05-302-1/+5
| | | | llvm-svn: 209913
* Revert "Invalidate the file system cache entries for files that may rebuild"Ben Langmuir2014-05-301-18/+5
| | | | | | This reverts commit r209910, which is breaking some of the bots. llvm-svn: 209911
* Invalidate the file system cache entries for files that may rebuildBen Langmuir2014-05-301-5/+18
| | | | | | | | | | | | | | | | | | I thought we could get away without this, but it means that the FileEntry objects actually refer to the wrong files, since pcms are not updated inplace, they are atomically renamed into place after compiling a module. So we are close to the original behaviour of invalidating the cache for all modules being removed, but now we should only invalidate the ones that depend on whichever module failed to load. Unfortunately I haven't come up with a new test that didn't require a race between parallel invocations of clang. <rdar://problem/17038180> llvm-svn: 209910
* Start adding support for dllimport/dllexport on classes (PR11170)Hans Wennborg2014-05-3011-33/+296
| | | | | | | | | | | | | | | | This implements the central part of support for dllimport/dllexport on classes: allowing the attribute on class declarations, inheriting it to class members, and forcing emission of exported members. It's based on Nico Rieck's patch from http://reviews.llvm.org/D1099. This patch doesn't propagate dllexport to bases that are template specializations, which is an interesting problem. It also doesn't look at the rules when redeclaring classes with different attributes, I'd like to do that separately. Differential Revision: http://reviews.llvm.org/D3877 llvm-svn: 209908
* Objective-C. Diagnose assigning a block pointer type toFariborz Jahanian2014-05-302-2/+24
| | | | | | | an Objective-C object type other than 'id'. // rdar://16739120 llvm-svn: 209906
* Thread Safety Analysis: fix uninitialized member in TIL Literal.DeLesley Hutchins2014-05-302-15/+17
| | | | llvm-svn: 209904
* AArch64: combine arm64 & aarch64 cases in switchTim Northover2014-05-301-23/+5
| | | | | | | | There shouldn't be any difference in behaviour here, at least not in any configurations people care about and possibly not in any reachable configurations. llvm-svn: 209899
* Remove unnecessary test.Diego Novillo2014-05-301-28/+0
| | | | llvm-svn: 209893
* This test is no longer relevant. It is covered already by ↵Aaron Ballman2014-05-301-5/+0
| | | | | | [basic.scope.pdecl]p10, and our current test for that is more thorough (though our test is named p9.cpp). llvm-svn: 209892
* This test should no longer be XFAILed; the standard has stabilized, and the ↵Aaron Ballman2014-05-301-13/+12
| | | | | | test contents are acceptable. No diagnostics expected from this test. llvm-svn: 209891
* Setting a heading for the section/allocate attribute so that the attribute ↵Aaron Ballman2014-05-301-0/+1
| | | | | | documentation can be properly generated. llvm-svn: 209890
* clang/test/Frontend/Weverything-and-remarks.cpp: Add explicit -target.NAKAMURA Takumi2014-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | You could see unexpected result (*.tmp.err) with "-target x86_64-win32". Weverything-and-remarks.cpp:11:9: warning: 'char32_t' type specifier is incompatible with C++98 [-Wc++98-compat] typedef __char32_t char32_t; ^ Weverything-and-remarks.cpp:12:27: error: typedef redefinition with different types ('unsigned long' vs 'unsigned long long') typedef long unsigned int size_t; ^ Weverything-and-remarks.cpp:19:62: warning: dynamic exception specifications are deprecated [-Wdeprecated] static void assign(char_type& __c1, const char_type& __c2) throw() { ^~~~~~~ Weverything-and-remarks.cpp:19:62: note: use 'noexcept' instead static void assign(char_type& __c1, const char_type& __c2) throw() { ^~~~~~~ noexcept Weverything-and-remarks.cpp:25:46: warning: unused parameter '__n' [-Wunused-parameter] size_t __n) { ^ 3 warnings and 1 error generated. llvm-svn: 209878
* [OPENMP] Improve debug location codegen for OpenMP runtime library.Alexey Bataev2014-05-302-14/+23
| | | | llvm-svn: 209876
* Fix 'this' capturing Generic lambdas used within default initializers (PR19876) Faisal Vali2014-05-302-2/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | http://llvm.org/bugs/show_bug.cgi?id=19876 The following C++1y code results in a crash: struct X { int m = 10; int n = [this](auto) { return m; }(20); }; When implicitly instantiating the generic lambda's call operator specialization body, Sema is unable to determine the current 'this' type when transforming the MemberExpr 'm' - since it looks for the nearest enclosing FunctionDeclDC - which is obviously null. I considered two ways to fix this: 1) In InstantiateFunctionDefinition, when the context is saved after the lambda scope info is created, retain the 'this' pointer. 2) Teach getCurrentThisType() to recognize it is within a generic lambda within an NSDMI/default-initializer and return the appropriate this type. I chose to implement #2 (though I confess I do not have a compelling reason for choosing it over #1). Richard Smith accepted the patch: http://reviews.llvm.org/D3935 Thank you! llvm-svn: 209874
* PR11410 - Confusing diagnostic when trailing array element tries to call ↵Nikola Smiljanic2014-05-303-3/+22
| | | | | | deleted default constructor llvm-svn: 209869
* PR12214 - Warn on suspicious self-compound-assignments.Nikola Smiljanic2014-05-303-2/+6
| | | | llvm-svn: 209867
* Permit the "if" literal suffix with Microsoft extensions enabled.Peter Collingbourne2014-05-292-2/+11
| | | | | | Differential Revision: http://reviews.llvm.org/D3963 llvm-svn: 209859
* Thread Safety Analysis: implement review suggestions from Aaron Ballman.DeLesley Hutchins2014-05-294-27/+38
| | | | llvm-svn: 209847
* Implement AVX1 vbroadcast intrinsics with vector initializersAdam Nemet2014-05-294-9/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These intrinsics are special because they directly take a memory operand (AVX2 adds the register counterparts). Typically, other non-memop intrinsics take registers and then it's left to isel to fold memory operands. In order to LICM intrinsics directly reading memory, we require that no stores are in the loop (LICM) or that the folded load accesses constant memory (MachineLICM). When neither is the case we fail to hoist a loop-invariant broadcast. We can work around this limitation if we expose the load as a regular load and then just implement the broadcast using the vector initializer syntax. This exposes the load to LICM and other optimizations. At the IR level this is translated into a series of insertelements. The sequence is already recognized as a broadcast so there is no impact on the quality of codegen. _mm256_broadcast_pd and _mm256_broadcast_ps are not updated by this patch because right now we lack the DAG-combiner smartness to recover the broadcast instructions. This will be tackled in a follow-on. There will be completing changes on the LLVM side to remove the LLVM intrinsics and to auto-upgrade bitcode files. Fixes <rdar://problem/16494520> llvm-svn: 209846
* Thread Safety Analysis: minor changes to TIL pretty-printing.DeLesley Hutchins2014-05-292-21/+23
| | | | llvm-svn: 209842
* Add documentation for -Rpass*Diego Novillo2014-05-292-0/+71
| | | | | | | | | | | | | | Summary: This adds documentation for -Rpass, -Rpass-missed and -Rpass-analysis. It also adds release notes for 3.5. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3730 llvm-svn: 209841
* Add flags -Rpass-missed and -Rpass-analysis.Diego Novillo2014-05-298-50/+161
| | | | | | | | | | | | | | | | | | | | | | Summary: These two flags are in the same family as -Rpass, but are used in different situations. -Rpass-missed is used by optimizers to inform the user when they tried to apply an optimization but couldn't (or wouldn't). -Rpass-analysis is used by optimizers to report analysis results back to the user (e.g., why the transformation could not be applied). Depends on D3682. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3683 llvm-svn: 209839
* Make the -mno-global-merge option work for arm64/aarch64. rdar://17024719Bob Wilson2014-05-292-0/+16
| | | | llvm-svn: 209836
* Make runlines consistent with other dll attribute testsNico Rieck2014-05-291-4/+4
| | | | llvm-svn: 209831
* Fix some minor typos in testsNico Rieck2014-05-291-2/+2
| | | | llvm-svn: 209830
* Add missing -S to avoid invoking assembler unnecessarily.Diego Novillo2014-05-291-1/+1
| | | | llvm-svn: 209828
* Sema: Functions with dll attributes cannot be deletedNico Rieck2014-05-294-0/+52
| | | | llvm-svn: 209827
* MS ABI: Emit static data members with proper linkageNico Rieck2014-05-293-23/+19
| | | | llvm-svn: 209826
* Sema: Check dll attributes on static data membersNico Rieck2014-05-294-4/+362
| | | | | | | Redeclarations cannot add a dll attribute and static data members cannot be defined. llvm-svn: 209825
* No longer allow the -std options to entirely override the -x language ↵Aaron Ballman2014-05-293-13/+15
| | | | | | option. This allows -x cuda -std=c++11, for instance. llvm-svn: 209824
* Fix spurious remarks when -Weverything is used.Diego Novillo2014-05-292-0/+34
| | | | | | | | | | | With -Weverything, the backend remarks are enabled. This was causing spurious diagnostics for remarks that we don't yet handle (cf http://reviews.llvm.org/D3683). This will stop being a problem once http://reviews.llvm.org/D3683 is committed. llvm-svn: 209823
* Parsing/Sema for OMPAlignedClause.Alexander Musman2014-05-2919-15/+612
| | | | llvm-svn: 209816
* Refactoring. Remove Owned method from Sema.Nikola Smiljanic2014-05-2921-724/+585
| | | | llvm-svn: 209812
* Fixing a test case which was failing the MSVC build bots. When -std isn't ↵Aaron Ballman2014-05-291-1/+1
| | | | | | | | specified with an MSVC build, it defaults to -std=c++11, which overrides the -x cuda option. In turn, this causes all CUDA language option checks to fail. This fix is possibly temporary while we determine whether -x cuda should be considered along with -std=c++11 when setting language options. llvm-svn: 209808
* Refactoring. Remove release and take methods from ActionResult. Rename ↵Nikola Smiljanic2014-05-2938-812/+806
| | | | | | takeAs to getAs. llvm-svn: 209800
* When merging functions across modules (and in particular, instantiations ofRichard Smith2014-05-296-4/+78
| | | | | | | member functions), ensure that the redecl chain never transitions from 'inline' to 'not inline', since that violates an AST invariant. llvm-svn: 209794
* Implement a convenience recursive walk method over a cursor and its descendants.Eli Bendersky2014-05-292-29/+21
| | | | | | | | | | | | | Before r160106 there was a way to recursively visit all descendants of a cursor via Cursor_visit, but it was removed. Since then, every user needs to reimplement the recursive descent into get_children. Adding a walk_preorder() method to Cursor that conveniently implements recursive walking in a Pythonic way. This also greatly simplifies get_cursor and get_cursors in tests/cindex/util.py (walk_preorder is now tested through these utility functions, since they are used in many tests). llvm-svn: 209793
* [ASan] Hoist blacklisting globals from init-order checking to Clang.Alexey Samsonov2014-05-292-6/+14
| | | | | | | | | Clang knows about the sanitizer blacklist and it makes no sense to add global to the list of llvm.asan.dynamically_initialized_globals if it will be blacklisted in the instrumentation pass anyway. Instead, we should do as much blacklisting as possible (if not all) in the frontend. llvm-svn: 209789
* PR19878: If a pack expansion appears within another pack expansion, correctlyRichard Smith2014-05-293-199/+204
| | | | | | deduce any packs that are expanded by both expansions. llvm-svn: 209786
* Thread Safety Analysis: update TIL traversal mechanism to allow arbitraryDeLesley Hutchins2014-05-287-358/+594
| | | | | | local contexts. Also includes some minor refactoring. llvm-svn: 209774
* added Intel's BMI intrinsic variants Sanjay Patel2014-05-282-2/+120
| | | | | | (fixes PR19431 - http://llvm.org/bugs/show_bug.cgi?id=19431) llvm-svn: 209769
* Expose CUDA function attributes to the C interface.Eli Bendersky2014-05-285-2/+38
| | | | | | | | Until now all CUDA-specific attributes were represented with CXCursor_UnexposedAttr; now they are actually implemented, including the Python bindings. llvm-svn: 209767
* Reverting 209503 - Breaks asan blacklistsWarren Hunt2014-05-282-10/+1
| | | | | | | | I opened a discussion on cfe-commits. Ideally we've got a few things that need to happen. CompilerRT should probably have blacklists tests. Asan should probably not depend on that specific field. llvm-svn: 209766
OpenPOWER on IntegriCloud