- Mar 28, 2017
-
-
Eric Liu authored
Summary: ... which applies a set of `AtomicChange`s on code. Reviewers: klimek, djasper Reviewed By: djasper Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D30777 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298913 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Liu authored
Reviewers: hokein, aaron.ballman Reviewed By: aaron.ballman Subscribers: aaron.ballman, cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D28671 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298912 91177308-0d34-0410-b5e6-96231b3b80d8
-
Erik Verbruggen authored
The getVirtualFile method would create entries for e.g. libclang's CXUnsavedFile but not mark them as valid. The effect is that a lookup through getFile where the file name is not exactly matching the virtual file (e.g. through mixing slashes and backslashes on Windows) would result in a normal file "lookup", and re-using the file entry found by using the UniqueID, and overwrite the file entry fields. Because the lookup involves opening the file, and moving it into the file entry, the file is now open. The SourceManager keys its buffers on the UniqueID (which is still the same), so it will find an already loaded buffer. Because only the loading a buffer from disk will close the file, the FileEntry will hold on to an open file for as long as the FileManager is around. As the FileManager will only get destroyed at a reparse, you can't safe to the "leaked" and locked file on Windows. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298905 91177308-0d34-0410-b5e6-96231b3b80d8
-
Erik Verbruggen authored
If there is an unresolved member access AST node, and the base is implicit, do not access/use it for generating candidate overloads for code completion results. Fixes PR31093. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298903 91177308-0d34-0410-b5e6-96231b3b80d8
-
Gor Nishanov authored
FIXME: ActOnReturnStmt expects a scope that is inside of the function, due to CheckJumpOutOfSEHFinally(*this, ReturnLoc, *CurScope->getFnParent()); S.getCurScope()->getFnParent() == nullptr at ActOnFinishFunctionBody when CoroutineBodyStmt is built. Figure it out and fix it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298893 91177308-0d34-0410-b5e6-96231b3b80d8
-
Gor Nishanov authored
Summary: If promise_type has get_return_object_on_allocation_failure defined, check if an allocation function returns nullptr, and if so, return the result of get_return_object_on_allocation_failure(). Reviewers: rsmith, EricWF Reviewed By: EricWF Subscribers: mehdi_amini, cfe-commits Differential Revision: https://reviews.llvm.org/D31399 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298891 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 27, 2017
-
-
Matthias Gehre authored
Summary: This patch implements parsing of [[clang::suppress(rule, ...)]] and [[gsl::suppress(rule, ...)]] attributes. C++ Core Guidelines depend heavily on tool support for rule enforcement. They also propose a way to suppress warnings [1] which is by annotating any ancestor in AST with the C++11 attribute [[gsl::suppress(rule1,...)]]. To have a mechanism to suppress non-C++ Core Guidelines specific, an additional spelling of [[clang::suppress]] is defined. For example, to suppress the warning cppcoreguidelines-slicing, one could do ``` [[clang::suppress("cppcoreguidelines-slicing")]] void f() { ... code that does slicing ... } ``` or ``` void g() { Derived b; [[clang::suppress("cppcoreguidelines-slicing")]] Base a{b}; [[clang::suppress("cppcoreguidelines-slicing")]] { doSomething(); Base a2{b}; } } ``` This parsing can then be used by clang-tidy, which includes multiple C++ Core Guidelines rules, to suppress warnings (see https://reviews.llvm.org/D24888). For the exact naming of the rule in the attribute, there are different possibilities, which will be defined in the corresponding clang-tidy patch. Currently, clang-tidy supports suppressing of warnings through "// NOLINT" comments. There are some advantages that the attribute has: - Suppressing specific warnings instead of all warnings - Suppressing warnings in a block (namespace, function, compound statement) - Code formatting may split a statement into multiple lines, thus a "// NOLINT" comment may be on the wrong line I'm looking forward to your comments! [1] https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#inforce-enforcement Reviewers: alexfh, aaron.ballman, rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24886 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298880 91177308-0d34-0410-b5e6-96231b3b80d8
-
Adam Nemet authored
Sema holds the current FPOptions which is adjusted by 'pragma STDC FP_CONTRACT'. This then gets propagated into expression nodes as they are built. This encapsulates FPOptions so that this propagation happens opaquely rather than directly with the fp_contractable on/off bit. This allows controlled transitioning of fp_contractable to a ternary value (off, on, fast). It will also allow adding more fast-math flags later. This is toward moving fp-contraction=fast from an LLVM TargetOption to a FastMathFlag in order to fix PR25721. Differential Revision: https://reviews.llvm.org/D31166 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298877 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
for unused values. This fixes a regression caused by r298676, where constructor calls to classes with non-trivial dtor were marked as unused if the first argument is an initializer list. This is inconsistent (as the test shows) and also warns on a reasonbly common code pattern where people just call constructors to create and immediately destroy an object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298853 91177308-0d34-0410-b5e6-96231b3b80d8
-
Sanne Wouda authored
Reviewers: olista01, rengolin, javed.absar, samparker Reviewed By: samparker Subscribers: samparker, llvm-commits, aemerson Differential Revision: https://reviews.llvm.org/D31197 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298850 91177308-0d34-0410-b5e6-96231b3b80d8
-
Vassil Vassilev authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298842 91177308-0d34-0410-b5e6-96231b3b80d8
-
Egor Churaev authored
Summary: Enable cl_mad_enamle and cl_no_signed_zeros options when user turns on cl_unsafe_math_optimizations or cl_fast_relaxed_math options. Reviewers: Anastasia, cfe-commits Reviewed By: Anastasia Subscribers: bader, yaxunl Differential Revision: https://reviews.llvm.org/D31324 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298838 91177308-0d34-0410-b5e6-96231b3b80d8
-
Dean Michael Berris authored
Summary: This change depends on D31381 where we change the implementation to use sanitizer_common provided atomic operations library. Fixes http://llvm.org/PR32274. Reviewers: pelikan, dblaikie Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D31382 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298835 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 26, 2017
-
-
Vassil Vassilev authored
I failed to revert this in r298816. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298824 91177308-0d34-0410-b5e6-96231b3b80d8
-
Vassil Vassilev authored
They broke llvm modules builds and our internal modules infrastructure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298816 91177308-0d34-0410-b5e6-96231b3b80d8
-
Gor Nishanov authored
Details: Emit suspend expression which roughly looks like: auto && x = CommonExpr(); if (!x.await_ready()) { llvm_coro_save(); x.await_suspend(...); (*) llvm_coro_suspend(); (**) } x.await_resume(); where the result of the entire expression is the result of x.await_resume() (*) If x.await_suspend return type is bool, it allows to veto a suspend: if (x.await_suspend(...)) llvm_coro_suspend(); (**) llvm_coro_suspend() encodes three possible continuations as a switch instruction: %where-to = call i8 @llvm.coro.suspend(...) switch i8 %where-to, label %coro.ret [ ; jump to epilogue to suspend i8 0, label %yield.ready ; go here when resumed i8 1, label %yield.cleanup ; go here when destroyed ] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298784 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 25, 2017
-
-
Eric Christopher authored
Adjust and add a test for the 32-bit side. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298778 91177308-0d34-0410-b5e6-96231b3b80d8
-
Yaxun Liu authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298773 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Christopher authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298771 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Christopher authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298770 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Christopher authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298769 91177308-0d34-0410-b5e6-96231b3b80d8
-
Yaxun Liu authored
For target environment amdgiz and amdgizcl (giz means Generic Is Zero), AMDGPU will use new address space mapping where generic address space is 0 and private address space is 5. The data layout is also changed correspondingly. Differential Revision: https://reviews.llvm.org/D31210 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298767 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Christopher authored
This typically is only for a new enough linker (bfd >= 2.16.2 or gold), but our ppc suppport post-dates this and it should work on all linux platforms. It is guaranteed to work on all elfv2 platforms. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298765 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Christopher authored
than the default of 8 in clang, fix and update tests accordingly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298761 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Christopher authored
The le triple didn't exist until power8, so use that as a default (this also matches what gcc does). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298759 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Trieu authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298754 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 24, 2017
-
-
Richard Trieu authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298742 91177308-0d34-0410-b5e6-96231b3b80d8
-
Peter Collingbourne authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298728 91177308-0d34-0410-b5e6-96231b3b80d8
-
Simon Pilgrim authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298712 91177308-0d34-0410-b5e6-96231b3b80d8
-
Anastasia Stulova authored
The flag CXXOperatorNames was overwritten unconditionally after being set for OpenCL. There seems to be no necessity to set it, so removing the line. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298709 91177308-0d34-0410-b5e6-96231b3b80d8
-
Artem Dergachev authored
wantsRegionChangeUpdate() checker callback is no longer used since recently. Fixes a buildbot warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298699 91177308-0d34-0410-b5e6-96231b3b80d8
-
Artem Dergachev authored
The checker currently warns on copying, moving, or calling methods on an object that was recently std::move'd from. It understands a set of "state reset" methods that bring a moved-from object back to a well-specified state. Patch by Peter Szecsi! Differential Revision: https://reviews.llvm.org/D24246 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298698 91177308-0d34-0410-b5e6-96231b3b80d8
-
Krasimir Georgiev authored
Summary: AllocatedCXCodeCompleteResults::TemporaryFiles have turned into zombies. Seven years ago they used to do their job during [[ https://github.com/llvm-mirror/clang/commit/313e26c4e81f0e467490a530548450f4c824a6c4/tools/CIndex/CIndexCodeCompletion.cpp#diff-02d3e692ad507b10af9458b775c5750bL261 | file remapping]], but now they are created just to be torn down in the destructor. Reviewers: bkramer Reviewed By: bkramer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D31288 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298697 91177308-0d34-0410-b5e6-96231b3b80d8
-
Chandler Carruth authored
attributes. These patches don't work because we can't currently access the parameter information in a reliable way when building attributes. I thought this would be relatively straightforward to fix, but it seems not to be the case. Fixing this will requrie a substantial re-plumbing of machinery to allow attributes to be handled in this location, and several other fixes to the attribute machinery should probably be made at the same time. All of this will make the patch .... substantially more complicated. Reverting for now as there are active miscompiles caused by the current version. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298695 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
This change fixes a crash on initialization of a reference from ({}) during template instantiation and incidentally improves diagnostics. This reverts a prior attempt to handle this in r286721. Instead, we teach the initialization code that initialization cannot be performed if a source type is required and the initializer is an initializer list (which is not an expression and does not have a type), and likewise for function-style cast expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298676 91177308-0d34-0410-b5e6-96231b3b80d8
-
Dean Michael Berris authored
Summary: Now that XRay doesn't require a runtime dependency on a C++ standard library, we remove that dependency from the clang linker flags. Reviewers: saugustine, pelikan Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D31313 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298670 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298663 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298657 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 23, 2017
-
-
Dehao Chen authored
Summary: This is the test added for https://reviews.llvm.org/D31217 Reviewers: tejohnson, mehdi_amini Reviewed By: tejohnson Subscribers: cfe-commits, Prazek Differential Revision: https://reviews.llvm.org/D31219 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298647 91177308-0d34-0410-b5e6-96231b3b80d8
-
Teresa Johnson authored
Summary: Clang companion patch to LLVM patch D31027, which adds support for emitting minimized bitcode file for use in the thin link step. Add a cc1 option -fthin-link-bitcode=<file> to trigger this behavior. Depends on D31027. Reviewers: mehdi_amini, pcc Subscribers: cfe-commits, Prazek Differential Revision: https://reviews.llvm.org/D31050 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298639 91177308-0d34-0410-b5e6-96231b3b80d8
-