[PATCH] D56990: Bugfix for Replacement of tied operand of inline asm

2019-03-08 Thread Xiang Zhang via Phabricator via cfe-commits
xiangzhangllvm updated this revision to Diff 189979. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56990/new/ https://reviews.llvm.org/D56990 Files: lib/CodeGen/CGStmt.cpp test/CodeGen/asm-inout.c Index: test/CodeGen/asm-inout.c =

[PATCH] D56990: Bugfix for Replacement of tied operand of inline asm

2019-03-08 Thread Xiang Zhang via Phabricator via cfe-commits
xiangzhangllvm added a comment. Thank you, efriedma But but the LLVM and Clang are different projects, I can commit the change at one time. I 'll update the patch for clang first. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56990/new/ https://reviews.llvm.org/

[PATCH] D59127: [CMake] Support stripping and linking output to .build-id directory

2019-03-08 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC355765: [CMake] Support stripping and linking output to .build-id directory (authored by phosek, committed by ). Herald added a project: clang. Herald added a subscriber: cfe-commits. Changed prior to com

[PATCH] D59168: [runtimes] Move libunwind, libc++abi and libc++ to lib/clang/ and include/

2019-03-08 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: clang/test/Driver/linux-per-target-runtime-dir.c:15 // CHECK-PER-TARGET-RUNTIME: "--sysroot=[[SYSROOT]]" +// CHECK-PER-TARGET-RUNTIME: "-L{{.*}}{{/|}}..{{/|}}lib{{/|}}x86_64-linux-gnu" // CHECK-PER-TARGET-RUNTIME: "-L[[RES

[PATCH] D59168: [runtimes] Move libunwind, libc++abi and libc++ to lib/clang/ and include/

2019-03-08 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 189972. phosek marked 2 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59168/new/ https://reviews.llvm.org/D59168 Files: clang/lib/Driver/ToolChain.cpp clang/lib/Driver/ToolChains/Fuchsia.cpp clang/lib/Driver/ToolChains/L

r355765 - [CMake] Support stripping and linking output to .build-id directory

2019-03-08 Thread Petr Hosek via cfe-commits
Author: phosek Date: Fri Mar 8 17:26:55 2019 New Revision: 355765 URL: http://llvm.org/viewvc/llvm-project?rev=355765&view=rev Log: [CMake] Support stripping and linking output to .build-id directory When installing runtimes with install-runtimes-stripped, we don't want to just strip them, we al

[PATCH] D59168: [runtimes] Move libunwind, libc++abi and libc++ to lib/clang/ and include/

2019-03-08 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added inline comments. Comment at: clang/test/Driver/linux-per-target-runtime-dir.c:15 // CHECK-PER-TARGET-RUNTIME: "--sysroot=[[SYSROOT]]" +// CHECK-PER-TARGET-RUNTIME: "-L{{.*}}{{/|}}..{{/|}}lib{{/|}}x86_64-linux-gnu" // CHECK-PER-TARGET-RUNTIME: "-L[[RE

[PATCH] D59168: [runtimes] Move libunwind, libc++abi and libc++ to lib/clang/ and include/

2019-03-08 Thread Petr Hosek via Phabricator via cfe-commits
phosek marked an inline comment as done. phosek added inline comments. Comment at: clang/test/Driver/linux-per-target-runtime-dir.c:15 // CHECK-PER-TARGET-RUNTIME: "--sysroot=[[SYSROOT]]" +// CHECK-PER-TARGET-RUNTIME: "-L{{.*}}{{/|}}..{{/|}}lib{{/|}}x86_64-linux-gnu

[PATCH] D59168: [runtimes] Move libunwind, libc++abi and libc++ to lib/clang/ and include/

2019-03-08 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. The layout currently looks as follows: compiler-rt: headers: $prefix/lib/clang/$version/include libraries: $prefix/lib/clang/$version/$triple/lib/$name.$ext libc++, libc++abi, libunwind: headers: $prefix/include/c++/v1 libraries: $prefix/lib/clang/$t

[PATCH] D59168: [runtimes] Move libunwind, libc++abi and libc++ to lib/clang/ and include/

2019-03-08 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added inline comments. Comment at: clang/test/Driver/linux-per-target-runtime-dir.c:15 // CHECK-PER-TARGET-RUNTIME: "--sysroot=[[SYSROOT]]" +// CHECK-PER-TARGET-RUNTIME: "-L{{.*}}{{/|}}..{{/|}}lib{{/|}}x86_64-linux-gnu" // CHECK-PER-TARGET-RUNTIME: "-L[[RE

[PATCH] D59168: [runtimes] Move libunwind, libc++abi and libc++ to lib/clang/ and include/

2019-03-08 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. This is a reland of D59013 , apart from fixing the failing test on Windows, it also changes one thing where libraries are installed in `lib/clang/` rather than `lib/` based on the discussion in "RFC: Place libs in Clang-dedicated director

[PATCH] D59168: [runtimes] Move libunwind, libc++abi and libc++ to lib/clang/ and include/

2019-03-08 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added reviewers: smeenai, beanz, jdenny. Herald added subscribers: llvm-commits, libcxx-commits, cfe-commits, jdoerfert, kadircet, christof, ioeric, ilya-biryukov, mgorny. Herald added a reviewer: EricWF. Herald added projects: clang, libc++, LLVM. This change

[PATCH] D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()"

2019-03-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF closed this revision. EricWF added a comment. Committed as rr355763 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D47344/new/ https://reviews.llvm.org/D47344 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D58367: [analyzer] NFC: Improve upon the concept of BugReporterVisitor.

2019-03-08 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D58367#1423451 , @NoQ wrote: > Found a bug! The lambda has to manually make sure that the bug report > actually does have something to do with the checker. I think message-semantic is better than storing some data in two pla

[PATCH] D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()"

2019-03-08 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. In D47344#1423466 , @EricWF wrote: > @Quuxplusone Since the LLVM license has changed since you created this, I > need you to confirm that you accept LLVM's new license. Yes, I accept LLVM's new license. CHANGES SINCE LAST

[PATCH] D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()"

2019-03-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. @Quuxplusone Since the LLVM license has changed since you created this, I need you to confirm that you accept LLVM's new license. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D47344/new/ https://reviews.llvm.org/D47344

[PATCH] D58317: [clang] Add install targets for API headers

2019-03-08 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58317/new/ https://reviews.llvm.org/D58317 ___

[PATCH] D58317: [clang] Add install targets for API headers

2019-03-08 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. Ping (although I'm not planning to land this until Monday). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58317/new/ https://reviews.llvm.org/D58317 ___ cfe-commits mailing lis

[PATCH] D58367: [analyzer] NFC: Improve upon the concept of BugReporterVisitor.

2019-03-08 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 189948. NoQ added a comment. Found a bug! The lambda has to manually make sure that the bug report actually does have something to do with the checker. The attached testcase shows that we definitely need to avoid attaching a MIG checker note to a core.DivideZero

[PATCH] D59038: [8.0 Regression] Fix handling of `__builtin_constant_p` inside template arguments, enumerators, case statements, and the enable_if attribute.

2019-03-08 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D59038#1422905 , @hans wrote: > In D59038#1422890 , @rsmith wrote: > > > LGTM, and I think this is safe enough to take for Clang 8. > > > Do you think the severity is high enough to spin a

[PATCH] D59048: Add AIX Target Info

2019-03-08 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Basic/Targets/OSTargets.h:640 + +// Define _WCHAR_T when it is a fundamental type (i.e., for C++ without -fno-wchar). +if (Opts.CPlusPlus && Opts.WChar) { Line is longer than 80 characte

[PATCH] D55170: [clang-format]: Add NonEmptyParentheses spacing option

2019-03-08 Thread Reuben Thomas via Phabricator via cfe-commits
reuk updated this revision to Diff 189942. reuk added a comment. I've rebased onto master, and removed unrelated formatting changes. I've also tried to remove some of the duplicate parens-related expressions. I agree that the heavy nested boolean expressions are a bit painful to read, but I'm n

[RFC 09/12] Implement record field randomization algorithms

2019-03-08 Thread Connor Kuehl via cfe-commits
Co-authored-by: Cole Nixon Co-authored-by: Connor Kuehl Co-authored-by: James Foster Co-authored-by: Jeff Takahashi Co-authored-by: Jordan Cantrell Co-authored-by: Nikk Forbus Co-authored-by: Tim Pugh --- clang/include/clang/AST/DeclBase.h| 2 + .../clang/AST/RecordFieldReorga

[RFC 12/12] Wire up Randstruct; intercept and randomize

2019-03-08 Thread Connor Kuehl via cfe-commits
Co-authored-by: Cole Nixon Co-authored-by: Connor Kuehl Co-authored-by: James Foster Co-authored-by: Jeff Takahashi Co-authored-by: Jordan Cantrell Co-authored-by: Nikk Forbus Co-authored-by: Tim Pugh --- clang/lib/AST/RecordLayoutBuilder.cpp | 20 1 file changed, 20 in

[RFC 08/12] Add automatic structure selection compiler switch

2019-03-08 Thread Connor Kuehl via cfe-commits
This compiler switch allows the Randstruct feature to automatically select structures to randomize even if they're not decorated with the randomize_layout attribute. Structures can "opt out" of selection by using the no_randomize_layout attribute while this feature is active. Co-authored-by: Cole

[RFC 11/12] Forward declare RecordFieldReorganizer

2019-03-08 Thread Connor Kuehl via cfe-commits
Co-authored-by: Cole Nixon Co-authored-by: Connor Kuehl Co-authored-by: James Foster Co-authored-by: Jeff Takahashi Co-authored-by: Jordan Cantrell Co-authored-by: Nikk Forbus Co-authored-by: Tim Pugh --- clang/include/clang/AST/Decl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/cla

[RFC 10/12] Fix: Set tail pointer to null in field list

2019-03-08 Thread Connor Kuehl via cfe-commits
Co-authored-by: Cole Nixon Co-authored-by: Connor Kuehl Co-authored-by: James Foster Co-authored-by: Jeff Takahashi Co-authored-by: Jordan Cantrell Co-authored-by: Nikk Forbus Co-authored-by: Tim Pugh --- clang/lib/AST/DeclBase.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clan

[RFC 05/12] Add warning for mutually exclusive attributes

2019-03-08 Thread Connor Kuehl via cfe-commits
Co-authored-by: Cole Nixon Co-authored-by: Connor Kuehl Co-authored-by: James Foster Co-authored-by: Jeff Takahashi Co-authored-by: Jordan Cantrell Co-authored-by: Nikk Forbus Co-authored-by: Tim Pugh --- clang/include/clang/Basic/DiagnosticASTKinds.td | 3 +++ 1 file changed, 3 insertions(

[RFC 04/12] Add randomize_layout warning for unions

2019-03-08 Thread Connor Kuehl via cfe-commits
There is no technical advantage to randomizing the order fields within unions as they all share the same offset. Co-authored-by: Cole Nixon Co-authored-by: Connor Kuehl Co-authored-by: James Foster Co-authored-by: Jeff Takahashi Co-authored-by: Jordan Cantrell Co-authored-by: Nikk Forbus Co-

[RFC 07/12] Add randstruct-seed compiler argument

2019-03-08 Thread Connor Kuehl via cfe-commits
To create reproducible builds, the randstruct feature can (and should) operate on a seed provided at compile time. Co-authored-by: Cole Nixon Co-authored-by: Connor Kuehl Co-authored-by: James Foster Co-authored-by: Jeff Takahashi Co-authored-by: Jordan Cantrell Co-authored-by: Nikk Forbus C

[RFC 06/12] Add globals to store command line arguments in

2019-03-08 Thread Connor Kuehl via cfe-commits
Co-authored-by: Cole Nixon Co-authored-by: Connor Kuehl Co-authored-by: James Foster Co-authored-by: Jeff Takahashi Co-authored-by: Jordan Cantrell Co-authored-by: Nikk Forbus Co-authored-by: Tim Pugh --- clang/include/clang/AST/RandstructSeed.h | 8 clang/lib/AST/CMakeLists.txt

[RFC 00/12] Introduce struct layout randomization feature

2019-03-08 Thread Connor Kuehl via cfe-commits
This patch set introduces structure field layout randomization into the Clang compiler. The Randstruct feature is a compile-time hardening technique that randomizes the field layout for designated structures of a code base. Admittedly, this is mostly useful for closed-source releases of code (sin

[RFC 03/12] Add no_randomize_layout attribute and handler

2019-03-08 Thread Connor Kuehl via cfe-commits
Co-authored-by: Cole Nixon Co-authored-by: Connor Kuehl Co-authored-by: James Foster Co-authored-by: Jeff Takahashi Co-authored-by: Jordan Cantrell Co-authored-by: Nikk Forbus Co-authored-by: Tim Pugh --- clang/include/clang/Basic/Attr.td | 7 +++ clang/lib/Sema

[RFC 01/12] Add documentation for randstruct attributes

2019-03-08 Thread Connor Kuehl via cfe-commits
Co-authored-by: Cole Nixon Co-authored-by: Connor Kuehl Co-authored-by: James Foster Co-authored-by: Jeff Takahashi Co-authored-by: Jordan Cantrell Co-authored-by: Nikk Forbus Co-authored-by: Tim Pugh --- clang/include/clang/Basic/AttrDocs.td | 45 +++ 1 file changed

[RFC 02/12] Add randomize_layout attribute and handler

2019-03-08 Thread Connor Kuehl via cfe-commits
Co-authored-by: Cole Nixon Co-authored-by: Connor Kuehl Co-authored-by: James Foster Co-authored-by: Jeff Takahashi Co-authored-by: Jordan Cantrell Co-authored-by: Nikk Forbus Co-authored-by: Tim Pugh --- clang/include/clang/Basic/Attr.td | 7 +++ clang/lib/Sema

[PATCH] D58921: [CMake] Tell libc++ that we're using compiler-rt on Apple platforms

2019-03-08 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. In D58921#1423294 , @smeenai wrote: > Is this to work around > https://github.com/llvm/llvm-project/blob/f84083b4dbb1ddb6d2783400f11121f490cdb5a8/libcxx/lib/CMakeLists.txt#L312? Yes, precisely. Note that I think this option shou

[PATCH] D59038: [8.0 Regression] Fix handling of `__builtin_constant_p` inside template arguments, enumerators, case statements, and the enable_if attribute.

2019-03-08 Thread Eric Fiselier via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC355743: [8.0 Regression] Fix handling of `__builtin_constant_p` inside template… (authored by EricWF, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59038/ne

Re: r352930 - [WebAssembly] Add an import_field function attribute

2019-03-08 Thread Aaron Ballman via cfe-commits
On Wed, Feb 6, 2019 at 12:43 AM Dan Gohman wrote: > > > > On Tue, Feb 5, 2019 at 11:20 AM Aaron Ballman wrote: >> >> On Fri, Feb 1, 2019 at 8:27 PM Dan Gohman wrote: >> > >> > >> > Indeed, and the existing import_module attribute needs these tests as >> > well. I'll write some and add them in

r355743 - [8.0 Regression] Fix handling of `__builtin_constant_p` inside template arguments, enumerators, case statements, and the enable_if attribute.

2019-03-08 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri Mar 8 14:06:48 2019 New Revision: 355743 URL: http://llvm.org/viewvc/llvm-project?rev=355743&view=rev Log: [8.0 Regression] Fix handling of `__builtin_constant_p` inside template arguments, enumerators, case statements, and the enable_if attribute. Summary: The followin

[PATCH] D59038: [8.0 Regression] Fix handling of `__builtin_constant_p` inside template arguments, enumerators, case statements, and the enable_if attribute.

2019-03-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 189930. EricWF retitled this revision from "[8.0 Regression] Fix handling of `__builtin_constant_p` inside the enable_if attribute." to "[8.0 Regression] Fix handling of `__builtin_constant_p` inside template arguments, enumerators, case statements, and the e

[PATCH] D59103: [clang-tidy] New checker bugprone-incomplete-comparison-operator

2019-03-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D59103#1422775 , @kallehuttunen wrote: > Another idea that came to my mind would be to enable this check only for > annotated types. So warning for missing field access would be only given for > types that have for exam

[PATCH] D59038: [8.0 Regression] Fix handling of `__builtin_constant_p` inside the enable_if attribute.

2019-03-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 189927. EricWF added a comment. Add more tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59038/new/ https://reviews.llvm.org/D59038 Files: lib/AST/ExprConstant.cpp test/SemaCXX/constant-expression-cxx1y.cpp test/SemaCXX/enable_if.cpp In

[PATCH] D58921: [CMake] Tell libc++ that we're using compiler-rt on Apple platforms

2019-03-08 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. Is this to work around https://github.com/llvm/llvm-project/blob/f84083b4dbb1ddb6d2783400f11121f490cdb5a8/libcxx/lib/CMakeLists.txt#L312? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58921/new/ https://reviews.llvm.org/D58921 ___

[PATCH] D45978: dllexport const variables must have external linkage.

2019-03-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I think we're pretty close! Some of the testing code can be cleaned up, but I could also use some help verifying that we're correctly matching the behavior of GCC as well. Comment at: test/Sema/dllexport-2.cpp:11 +// expected-warning@+3 {{__decl

[PATCH] D58797: [Sema] Add some compile time _FORTIFY_SOURCE diagnostics

2019-03-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Decl.cpp:2994 +/// +/// \param ConsiderWrapperFunctions If we should consider wrapper functions as +/// their wrapped builtins. This shouldn't be done in general, but its useful in If we should -> If

[PATCH] D58346: [Sema] Change addr space diagnostics in casts to follow C++ style

2019-03-08 Thread David Salinas via Phabricator via cfe-commits
david-salinas added a comment. This change has caused a regression for generic C++. Should this affect OpenCL only? The following simple test causes the diagnostic to be emitted: #define ATTR_GLOBAL __attribute__((address_space(1))) int calc(int ATTR_GLOBAL *ip) { int i = *ip; return i+1

Re: r355182 - [clang-format] [NFC] clang-format the Format library

2019-03-08 Thread Michael Kruse via cfe-commits
Isn't this kind of commit discouraged?, as by https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access > Avoid committing formatting- or whitespace-only changes outside of code you > plan to make subsequent changes to. and the discussion after which this has been added: https://lists.l

r355729 - [OPENMP]Remove debug service variable.

2019-03-08 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Fri Mar 8 12:48:54 2019 New Revision: 355729 URL: http://llvm.org/viewvc/llvm-project?rev=355729&view=rev Log: [OPENMP]Remove debug service variable. Removed not required service variable for the debug info. Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp

[PATCH] D56990: Bugfix for Replacement of tied operand of inline asm

2019-03-08 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. We expect that tests for clang IR generation should look something like clang/test/CodeGen/asm-inout.c. Even though a test like that isn't directly testing the overall behavior, we try to separate tests of clang's behavior from tests of LLVM's behavior. It gives bett

r355726 - [docs] Fix checkers.rst doc for PointerSorting checker

2019-03-08 Thread Mandeep Singh Grang via cfe-commits
Author: mgrang Date: Fri Mar 8 12:35:25 2019 New Revision: 355726 URL: http://llvm.org/viewvc/llvm-project?rev=355726&view=rev Log: [docs] Fix checkers.rst doc for PointerSorting checker Modified: cfe/trunk/docs/analyzer/checkers.rst Modified: cfe/trunk/docs/analyzer/checkers.rst URL: http

[PATCH] D58921: [CMake] Tell libc++ that we're using compiler-rt on Apple platforms

2019-03-08 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. Ping. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58921/new/ https://reviews.llvm.org/D58921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[libunwind] r355725 - Revert "[runtimes] Move libunwind, libc++abi and libc++ to lib/ and include/"

2019-03-08 Thread Matthew Voss via cfe-commits
Author: ormris Date: Fri Mar 8 12:33:55 2019 New Revision: 355725 URL: http://llvm.org/viewvc/llvm-project?rev=355725&view=rev Log: Revert "[runtimes] Move libunwind, libc++abi and libc++ to lib/ and include/" This broke the windows bots. This reverts commit 28302c66d2586074f77497d5dc4eac7182b6

r355725 - Revert "[runtimes] Move libunwind, libc++abi and libc++ to lib/ and include/"

2019-03-08 Thread Matthew Voss via cfe-commits
Author: ormris Date: Fri Mar 8 12:33:55 2019 New Revision: 355725 URL: http://llvm.org/viewvc/llvm-project?rev=355725&view=rev Log: Revert "[runtimes] Move libunwind, libc++abi and libc++ to lib/ and include/" This broke the windows bots. This reverts commit 28302c66d2586074f77497d5dc4eac7182b6

r355721 - Revert "Recommit "Support attribute used in member funcs of class templates""

2019-03-08 Thread Rafael Auler via cfe-commits
Author: rafauler Date: Fri Mar 8 12:23:57 2019 New Revision: 355721 URL: http://llvm.org/viewvc/llvm-project?rev=355721&view=rev Log: Revert "Recommit "Support attribute used in member funcs of class templates"" There is nontrivial bug caused in lld that I need to further investigate. Meanwhile,

[PATCH] D58530: Add PragmaHandler for MSVC pragma execution_character_set

2019-03-08 Thread Nico Weber via Phabricator via cfe-commits
thakis accepted this revision. thakis added a comment. Ah ok, then I agree this doesn't need serialization yet :) It'd be nice to at least diag that the stack use is valid (also for the warning stack), but it doesn't have to be in this change. CHANGES SINCE LAST ACTION https://reviews.llvm.o

r355720 - [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-03-08 Thread Mandeep Singh Grang via cfe-commits
Author: mgrang Date: Fri Mar 8 12:13:53 2019 New Revision: 355720 URL: http://llvm.org/viewvc/llvm-project?rev=355720&view=rev Log: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements Summary: Added a new category of checkers for non-determinism. Added a checker fo

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-03-08 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 189905. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50488/new/ https://reviews.llvm.org/D50488 Files: docs/analyzer/checkers.rst include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-03-08 Thread Mandeep Singh Grang via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL355720: [Analyzer] Checker for non-determinism caused by sorting of pointer-like… (authored by mgrang, committed by ). Her

Re: r355627 - Recommit "Support attribute used in member funcs of class templates"

2019-03-08 Thread Petr Hosek via cfe-commits
This seems to have broke the 2-stage LTO build of LLVM, the error is: ld.lld: /usr/local/google/home/phosek/clang-llvm/llvm-project/llvm/lib/IR/Constants.cpp:995: static llvm::Constant *llvm::ConstantArray::getImpl(llvm::ArrayType *, ArrayRef): Assertion `V[i]->getType() == Ty->getElementType() &&

[PATCH] D56928: Support attribute used in member funcs of class templates

2019-03-08 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. Herald added a project: clang. This broke the 2-stage LTO build of LLVM, the error is: ld.lld: /usr/local/google/home/phosek/clang-llvm/llvm-project/llvm/lib/IR/Constants.cpp:995: static llvm::Constant *llvm::ConstantArray::getImpl(llvm::ArrayType *, ArrayRef): Assert

[PATCH] D58930: Add XCOFF triple object format type for AIX

2019-03-08 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. @jasonliu, you have had a number of patches committed into the project already (D22698 , D22702 , D34649 ). Please go ahead with requesting commit access, a

[PATCH] D59048: Add AIX Target Info

2019-03-08 Thread Andus Yu via Phabricator via cfe-commits
andusy marked 2 inline comments as done. andusy added inline comments. Comment at: clang/test/CodeGen/arm-aapcs-zerolength-bitfield.c:5 +// RUN: %clang_cc1 -triple powerpc-ibm-aix7.1.0.0 %s -verify +// expected-no-diagnostics This file is pending a name change.

[PATCH] D59048: Add AIX Target Info

2019-03-08 Thread Andus Yu via Phabricator via cfe-commits
andusy marked 7 inline comments as done. andusy added inline comments. Comment at: clang/lib/Basic/Targets/OSTargets.h:641 +} + } + hubert.reinterpretcast wrote: > D18360 sets `_THREAD_SAFE` to `1` when `-pthread` is specified. I believe > that to be correc

[PATCH] D59048: Add AIX Target Info

2019-03-08 Thread Andus Yu via Phabricator via cfe-commits
andusy updated this revision to Diff 189890. andusy added a comment. Herald added a subscriber: javed.absar. - Updated comments - Added testing for `UseZeroLengthBitfieldAlignment` - Defined `_THREAD_SAFE ` when `-pthread` is enabled - Check for definition of `__LP64__ ` and `_LP64 ` macros CH

[PATCH] D59038: [8.0 Regression] Fix handling of `__builtin_constant_p` inside the enable_if attribute.

2019-03-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In D59038#1422905 , @hans wrote: > In D59038#1422890 , @rsmith wrote: > > > LGTM, and I think this is safe enough to take for Clang 8. > > > Do you think the severity is high enough to spin a

[PATCH] D58530: Add PragmaHandler for MSVC pragma execution_character_set

2019-03-08 Thread Matt Gardner via Phabricator via cfe-commits
sigatrev added a comment. This implementation doesn't track the push/pop stack, it just verifies the synax is valid and moves on. I modeled it after the PragmaWarningHandler which does the same, and thought it would be fine in this case since the only accepted value is a no-op. CHANGES SINCE

[PATCH] D59038: [8.0 Regression] Fix handling of `__builtin_constant_p` inside the enable_if attribute.

2019-03-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 189888. EricWF added a comment. - Fix regressions inside template parameters, case statements, and enumerators. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59038/new/ https://reviews.llvm.org/D59038 Files: lib/AST/ExprConstant.cpp test/SemaCXX

[PATCH] D58216: Support attribute used in member funcs of class templates II

2019-03-08 Thread David Zarzycki via Phabricator via cfe-commits
davezarzycki added a comment. https://bugs.llvm.org/show_bug.cgi?id=41016 Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58216/new/ https://reviews.llvm.org/D58216 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[PATCH] D58216: Support attribute used in member funcs of class templates II

2019-03-08 Thread Rafael Auler via Phabricator via cfe-commits
rafauler added a comment. I definitely understand how the diagnostic can be confusing. However, it's the same diagnostic gcc provides too, so gcc users wouldn't be surprised. But you're right this can be improved by at least mentioning the attribute used in the diagnostic message. There's no bu

[PATCH] D59038: [8.0 Regression] Fix handling of `__builtin_constant_p` inside the enable_if attribute.

2019-03-08 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. In D59038#1422890 , @rsmith wrote: > LGTM, and I think this is safe enough to take for Clang 8. Do you think the severity is high enough to spin another release candidate? My concern is that since this didn't show up in testing unt

[PATCH] D59038: [8.0 Regression] Fix handling of `__builtin_constant_p` inside the enable_if attribute.

2019-03-08 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM, and I think this is safe enough to take for Clang 8. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59038/new/ https://reviews.llvm.org/D59038

[PATCH] D58216: Support attribute used in member funcs of class templates II

2019-03-08 Thread David Zarzycki via Phabricator via cfe-commits
davezarzycki added a comment. I've got a patch pending for Swift. That being said, the clang diagnostics leave something to be desired. If `__attribute__((used))` on definitions is sloppy at best or wrong at worst, then that should have a warning/error. Want a bug report? Or does one exist alre

[PATCH] D59135: Add check for matching HeaderFilter before emitting Diagnostic

2019-03-08 Thread Thorsten via Phabricator via cfe-commits
thorsten-klein added a comment. Sorry for delay. I am currently not able to build master (Error: "sort" is not a member of "llvm"). And if I try to build 6.0.1-rc3 I can build clang-tidy but I am not able to build corresponding unittests "ClangTidyTests". I will try to solve as soon as possible.

[PATCH] D57662: [clang-tidy] Parallelize clang-tidy-diff.py

2019-03-08 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. Gentle ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57662/new/ https://reviews.llvm.org/D57662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[PATCH] D57891: [analyzer] Fix infinite recursion in printing macros

2019-03-08 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL355705: [analyzer] Fix infinite recursion in printing macros (authored by Szelethus, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https

r355705 - [analyzer] Fix infinite recursion in printing macros

2019-03-08 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri Mar 8 08:26:29 2019 New Revision: 355705 URL: http://llvm.org/viewvc/llvm-project?rev=355705&view=rev Log: [analyzer] Fix infinite recursion in printing macros In the commited testfile, macro expansion (the one implemented for the plist output) runs into an infinite r

[PATCH] D58977: [clang-tidy] Add the abseil-time-comparison check

2019-03-08 Thread Hyrum Wright via Phabricator via cfe-commits
hwright updated this revision to Diff 189862. hwright marked 6 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58977/new/ https://reviews.llvm.org/D58977 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/abseil/CMakeLists.txt clang-tidy/abseil/TimeComp

[PATCH] D58977: [clang-tidy] Add the abseil-time-comparison check

2019-03-08 Thread Hyrum Wright via Phabricator via cfe-commits
hwright added inline comments. Comment at: clang-tidy/abseil/TimeComparisonCheck.cpp:23 + auto Matcher = + binaryOperator(anyOf(hasOperatorName(">"), hasOperatorName(">="), + hasOperatorName("=="), hasOperatorName("<="), ioeric wro

[PATCH] D59048: Add AIX Target Info

2019-03-08 Thread Sean Fertile via Phabricator via cfe-commits
sfertile added inline comments. Comment at: clang/test/Preprocessor/init.c:6420 +// PPC64-AIX:#define _LONG_LONG 1 +// PPC64-AIX:#define _POWER 1 +// PPC64-AIX:#define __64BIT__ 1 hubert.reinterpretcast wrote: > hubert.reinterpretcast wrote: > > apaprocki wrote:

[PATCH] D57850: [analyzer] Emit an error rather than assert on invalid checker option input

2019-03-08 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC355704: [analyzer] Emit an error rather than assert on invalid checker option input (authored by Szelethus, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57

r355704 - [analyzer] Emit an error rather than assert on invalid checker option input

2019-03-08 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri Mar 8 08:00:42 2019 New Revision: 355704 URL: http://llvm.org/viewvc/llvm-project?rev=355704&view=rev Log: [analyzer] Emit an error rather than assert on invalid checker option input Asserting on invalid input isn't very nice, hence the patch to emit an error instead.

[PATCH] D59121: [analyzer] Fix macro names in diagnostics within bigger macros.

2019-03-08 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso requested changes to this revision. Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1985 bool partOfParentMacro = false; +StringRef PName = ""; if (ParentEx->getBeginLoc().isMacroID()) { `Pa

[PATCH] D59055: [analyzer] Prepare generic taint checker for new sources

2019-03-08 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC355703: [analyzer] Use the new infrastructure of expressing taint propagation, NFC (authored by Szelethus, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D590

r355703 - [analyzer] Use the new infrastructure of expressing taint propagation, NFC

2019-03-08 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri Mar 8 07:47:56 2019 New Revision: 355703 URL: http://llvm.org/viewvc/llvm-project?rev=355703&view=rev Log: [analyzer] Use the new infrastructure of expressing taint propagation, NFC In D55734, we implemented a far more general way of describing taint propagation rules

[PATCH] D58930: Add XCOFF triple object format type for AIX

2019-03-08 Thread Sean Fertile via Phabricator via cfe-commits
sfertile accepted this revision. sfertile added a comment. LGTM. Comment at: llvm/lib/MC/MCContext.cpp:165 +case MCObjectFileInfo::IsXCOFF: + // TODO: Need to implement class MCSymbolXCOFF. + break; jasonliu wrote: > sfertile wrote: > > jasonliu w

[clang-tools-extra] r355702 - [clang-tidy] NFC: Negate the name and semantics of the isNotInMacro function.

2019-03-08 Thread Hyrum Wright via cfe-commits
Author: hwright Date: Fri Mar 8 07:37:15 2019 New Revision: 355702 URL: http://llvm.org/viewvc/llvm-project?rev=355702&view=rev Log: [clang-tidy] NFC: Negate the name and semantics of the isNotInMacro function. This function is always used in a context where its result was also negated, which ma

[PATCH] D59135: Add check for matching HeaderFilter before emitting Diagnostic

2019-03-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D59135#1422781 , @thorsten-klein wrote: > Hello, > Can you please support how to do that? :-) All of the tests live in extra\test\clang-tidy\, so you'd add a file in there. I believe `file-filter.cpp` does stuff with

[PATCH] D59135: Add check for matching HeaderFilter before emitting Diagnostic

2019-03-08 Thread Thorsten via Phabricator via cfe-commits
thorsten-klein added a comment. Hello, Can you please support how to do that? :-) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59135/new/ https://reviews.llvm.org/D59135 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[PATCH] D59135: Add check for matching HeaderFilter before emitting Diagnostic

2019-03-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Can you add test coverage that demonstrates the fix behaves as expected? Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:454-455 + StringRef FileName(Loc.printToString(Loc.getManager())); + if(getHeaderFilter()->match(Fi

r355700 - Use {{.*}} in test case to match the type of wide string literals.

2019-03-08 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Mar 8 07:20:12 2019 New Revision: 355700 URL: http://llvm.org/viewvc/llvm-project?rev=355700&view=rev Log: Use {{.*}} in test case to match the type of wide string literals. The type of wide string literals varies depending on the target. Modified: cfe/trunk/test/

[PATCH] D59103: [clang-tidy] New checker bugprone-incomplete-comparison-operator

2019-03-08 Thread Kalle Huttunen via Phabricator via cfe-commits
kallehuttunen added a comment. Another idea that came to my mind would be to enable this check only for annotated types. So warning for missing field access would be only given for types that have for example `[[clang::annotate("value type")]]` annotation. Possibly other kinds of checks could b

[PATCH] D59135: Add check for matching HeaderFilter before emitting Diagnostic

2019-03-08 Thread Thorsten via Phabricator via cfe-commits
thorsten-klein updated this revision to Diff 189859. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59135/new/ https://reviews.llvm.org/D59135 Files: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp Index: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp ==

[PATCH] D59135: Add check for matching HeaderFilter before emitting Diagnostic

2019-03-08 Thread Thorsten via Phabricator via cfe-commits
thorsten-klein created this revision. thorsten-klein added reviewers: aaron.ballman, klimek, alexfh. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixed issue of not considering HeaderFilter which resulted in findings although they should be filtered out. Patch by Thorste

r355698 - Re-fix _lrotl/_lrotr to always take Long, no matter the platform.

2019-03-08 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Fri Mar 8 07:10:07 2019 New Revision: 355698 URL: http://llvm.org/viewvc/llvm-project?rev=355698&view=rev Log: Re-fix _lrotl/_lrotr to always take Long, no matter the platform. r355322 fixed this, however is being reverted due to concerns with enabling it in other modes.

r355697 - Revert "Enable _rotl, _lrotl, _rotr, _lrotr on all platforms."

2019-03-08 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Fri Mar 8 07:10:05 2019 New Revision: 355697 URL: http://llvm.org/viewvc/llvm-project?rev=355697&view=rev Log: Revert "Enable _rotl, _lrotl, _rotr, _lrotr on all platforms." This reverts commit 24400dafe16716f28cd0e7e5fa6e004c0e50686a. Removed: cfe/trunk/test/CodeGe

[PATCH] D59134: [ASTImporter] Remove obsolete function ImportTemplateParameterList.

2019-03-08 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp. Herald added a reviewer: martong. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: clang. The ASTNodeImporter::ImportTemplateParameterList is replaced by

[PATCH] D59087: [clang-format] [PR25010] AllowShortIfStatementsOnASingleLine not working if an "else" statement is present

2019-03-08 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 189854. MyDeveloperDay added a comment. Fix spelling typo in documentation and comment CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59087/new/ https://reviews.llvm.org/D59087 Files: clang/docs/ClangFormatStyleOptions.rst clang/include/c

[PATCH] D59105: [RFC] Create an Arbitrary Precision Integer Type.

2019-03-08 Thread Erich Keane via Phabricator via cfe-commits
erichkeane marked 7 inline comments as done. erichkeane added a comment. Thank you @rsmith for the quick review! I really appreciate it. In D59105#1422088 , @rsmith wrote: > In principle, I think an extension in this space seems reasonable and useful. >

[PATCH] D59103: [clang-tidy] New checker bugprone-incomplete-comparison-operator

2019-03-08 Thread Kalle Huttunen via Phabricator via cfe-commits
kallehuttunen added a comment. I found this checker to be useful in the code base I initially developed it for, but the usage of comparison operators there is pretty much limited to comparing simple aggregate types. It's true that this checker can produce lots of false positives, maybe too much

[PATCH] D55358: [ASTImporter] Fix import of NestedNameSpecifierLoc.

2019-03-08 Thread Gabor Marton via Phabricator via cfe-commits
martong added a reviewer: a_sidorin. martong added a comment. Herald added a reviewer: martong. Herald added a subscriber: jdoerfert. Herald added a project: clang. Ping Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55358/new/ https://reviews.llvm.org/D55358 _

  1   2   >