[PATCH] D55656: [OpenCL] Address space for default class members

2018-12-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/AST/ASTContext.cpp:2781 + + return getAddrSpaceQualType(NewT, Orig.getAddressSpace()); } Anastasia wrote: > rjmccall wrote: > > You're trying to handle a method qualifier, not a type a functions that are > > them

[PATCH] D54862: [OpenCL] Add generic AS to 'this' pointer

2018-12-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGCall.cpp:77 + if (MD) +RecTy = Context.getAddrSpaceQualType(RecTy, MD->getType().getAddressSpace()); return Context.getPointerType(CanQualType::CreateUnsafe(RecTy)); ebevhan wrote: > I'm a bit lat

[PATCH] D55749: [Driver] Automatically enable -munwind-tables if -fseh-exceptions is enabled

2018-12-17 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo marked 2 inline comments as done. mstorsjo added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:3929 + options::OPT_fno_asynchronous_unwind_tables, + (TC.IsUnwindTablesDefault(Args) || + (ExceptionArg && rnk wrote: > Can you

[PATCH] D55749: [Driver] Automatically enable -munwind-tables if -fseh-exceptions is enabled

2018-12-17 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 178513. mstorsjo marked an inline comment as done. mstorsjo added a comment. Moved the added code to `toolchains::MinGW::IsUnwindTablesDefault`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55749/new/ https://reviews.llvm.org/D55749 Files: lib/

r349388 - Fix build after r349380

2018-12-17 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Mon Dec 17 12:25:41 2018 New Revision: 349388 URL: http://llvm.org/viewvc/llvm-project?rev=349388&view=rev Log: Fix build after r349380 Modified: cfe/trunk/include/clang/Basic/TargetOptions.h Modified: cfe/trunk/include/clang/Basic/TargetOptions.h URL: http://llvm.org

[PATCH] D55710: add pragmas to control Software Pipelining optimisation

2018-12-17 Thread Alexey Lapshin via Phabricator via cfe-commits
alexey.lapshin added a comment. Ok, So thank you for the suggestions. I will implement that way. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55710/new/ https://reviews.llvm.org/D55710 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D55749: [Driver] Automatically enable -munwind-tables if -fseh-exceptions is enabled

2018-12-17 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55749/new/ https://reviews.llvm.org/D55749 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D55685: Update Microsoft name mangling scheme for exception specifiers in the type system

2018-12-17 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm, thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55685/new/ https://reviews.llvm.org/D55685 ___ cfe-commits mailing list cfe-commit

r349393 - Make test/Driver/darwin-sdk-version.c pass on hosts < macOS10.14

2018-12-17 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Mon Dec 17 13:01:04 2018 New Revision: 349393 URL: http://llvm.org/viewvc/llvm-project?rev=349393&view=rev Log: Make test/Driver/darwin-sdk-version.c pass on hosts < macOS10.14 The test test/Driver/darwin-sdk-version.c from r349380 checks if the macOS deployment target can

[PATCH] D55685: Update Microsoft name mangling scheme for exception specifiers in the type system

2018-12-17 Thread Zachary Henkel via Phabricator via cfe-commits
zahen added a comment. I don't have check-in permission, so I'd appreciate if someone could handle the actual commit. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55685/new/ https://reviews.llvm.org/D55685 ___ cfe-commits mailing list cfe

[PATCH] D55616: Emit ASM input in a constant context

2018-12-17 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. Ping? :-) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55616/new/ https://reviews.llvm.org/D55616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

r349394 - [analyzer] MoveChecker: Squash the bit field because it causes a GCC warning.

2018-12-17 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Dec 17 13:07:38 2018 New Revision: 349394 URL: http://llvm.org/viewvc/llvm-project?rev=349394&view=rev Log: [analyzer] MoveChecker: Squash the bit field because it causes a GCC warning. The warning seems spurious (GCC bug 51242), but the bit field is simply not worth t

[PATCH] D55616: Emit ASM input in a constant context

2018-12-17 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: test/CodeGen/builtin-constant-p.c:2 +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s -O2 | FileCheck --check-prefix=O2 %s +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s -O0 | FileCheck --che

[PATCH] D55671: [analyzer] Don't pretend that unknown block calls have one null parameter.

2018-12-17 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. Looks good to me! Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55671/new/ https://reviews.llvm.org/D55671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-b

[PATCH] D55566: [analyzer] LiveVariables: Fix a zombie expression problem, add testing infrastructure.

2018-12-17 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. This looks good to me. It is great to see a dumper for this! Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55566/new/ https://reviews.llvm.org/D55566 ___ cfe-commits mailing list cfe-commits

[PATCH] D55790: [AST] Add accessSpecs() iterator range for CXXRecordDecl

2018-12-17 Thread Mateusz Maćkowski via Phabricator via cfe-commits
m4tx created this revision. Herald added a subscriber: cfe-commits. Adds an iterator that allows to loop over C++ class/union/struct access specifier declarations. Repository: rC Clang https://reviews.llvm.org/D55790 Files: include/clang/AST/DeclCXX.h Index: include/clang/AST/DeclCXX.h

[PATCH] D55793: [clang-tidy] Add duplicated access specifier readability check

2018-12-17 Thread Mateusz Maćkowski via Phabricator via cfe-commits
m4tx created this revision. Herald added subscribers: cfe-commits, xazax.hun, mgorny. This finds redundant access specifier declarations inside classes, structs, and unions. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D55793 Files: clang-tidy/readability/CMakeLists.txt c

[PATCH] D55734: [analyzer] Revise GenericTaintChecker's internal representation

2018-12-17 Thread Borsik Gábor via Phabricator via cfe-commits
boga95 updated this revision to Diff 178537. boga95 marked 4 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55734/new/ https://reviews.llvm.org/D55734 Files: lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp Index: lib/StaticAnalyzer/Checkers/GenericTaintChec

[PATCH] D55790: [AST] Add accessSpecs() iterator range for CXXRecordDecl

2018-12-17 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. Do you really have to add an iterator for this particular thing ? Why not just use `specific_decl_iterator` in you clang-tidy checker ? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55790/new/ https://reviews.llvm.org/D55790 __

[PATCH] D55793: [clang-tidy] Add duplicated access specifier readability check (PR25403)

2018-12-17 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please close PR25403 after commit. Comment at: docs/ReleaseNotes.rst:70 +- New :doc:`readability-duplicated-access-specifiers + ` check. Please use alphabetical order for new checks. Repository: rCTE Clang Tools Extra CHA

[PATCH] D55793: [clang-tidy] Add duplicated access specifier readability check (PR25403)

2018-12-17 Thread Mateusz Maćkowski via Phabricator via cfe-commits
m4tx updated this revision to Diff 178539. m4tx added a comment. Use alphabetical order in ReleaseNotes.rst CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55793/new/ https://reviews.llvm.org/D55793 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/DuplicatedAccessS

[PATCH] D55793: [clang-tidy] Add duplicated access specifier readability check (PR25403)

2018-12-17 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Please add tests with preprocessor (`#if ...`) that will show that it ignores disabled code. e.g.: class ProbablyValid { private: int a; #if defined(ZZ) public: int b; #endif private: int c; protected: int d; public: int e; }; C

[PATCH] D55790: [AST] Add accessSpecs() iterator range for CXXRecordDecl

2018-12-17 Thread Mateusz Maćkowski via Phabricator via cfe-commits
m4tx added a comment. In D55790#1333627 , @riccibruno wrote: > Do you really have to add an iterator for this particular thing ? > Why not just use `specific_decl_iterator` in your clang-tidy > checker ? I don't need to - if this is the preferred way t

[PATCH] D55616: Emit ASM input in a constant context

2018-12-17 Thread Bill Wendling via Phabricator via cfe-commits
void marked an inline comment as done. void added inline comments. Comment at: test/CodeGen/builtin-constant-p.c:2 +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s -O2 | FileCheck --check-prefix=O2 %s +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-

r349414 - Update Microsoft name mangling scheme for exception specifiers in the type system

2018-12-17 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon Dec 17 15:10:43 2018 New Revision: 349414 URL: http://llvm.org/viewvc/llvm-project?rev=349414&view=rev Log: Update Microsoft name mangling scheme for exception specifiers in the type system Summary: The msvc exception specifier for noexcept function types has changed from t

[PATCH] D55685: Update Microsoft name mangling scheme for exception specifiers in the type system

2018-12-17 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349414: Update Microsoft name mangling scheme for exception specifiers in the type… (authored by rnk, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.ll

r349415 - Fix ms-layout_version declspec test and add missing new test

2018-12-17 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon Dec 17 15:16:43 2018 New Revision: 349415 URL: http://llvm.org/viewvc/llvm-project?rev=349415&view=rev Log: Fix ms-layout_version declspec test and add missing new test Now that MSVC compatibility versions are stored as a four digit number (1912) instead of a two digit numbe

[PATCH] D55793: [clang-tidy] Add duplicated access specifier readability check (PR25403)

2018-12-17 Thread Mateusz Maćkowski via Phabricator via cfe-commits
m4tx updated this revision to Diff 178543. m4tx added a comment. Don't use `CXXRecordDecl::accessSpecs()`, use unique comments in tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55793/new/ https://reviews.llvm.org/D55793 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/

[PATCH] D54862: [OpenCL] Add generic AS to 'this' pointer

2018-12-17 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. I'm also a bit confused about the semantics that this patch is applying to function types. It mostly seems to concern the extra trailing Qualifiers on CXXMethodDecl to store the addrspace quals, but in some places (SemaType:4842, SemaDecl:3198) it seems to be applying t

[PATCH] D55793: [clang-tidy] Add duplicated access specifier readability check (PR25403)

2018-12-17 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. In D55793#1333691 , @m4tx wrote: > Don't use `CXXRecordDecl::accessSpecs()`, use unique comments in tests. Thanks! `CXXRecordDecl` is already huge and so adding iterators for a single checker is in my opinion not a good idea

[PATCH] D54862: [OpenCL] Add generic AS to 'this' pointer

2018-12-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D54862#1333700 , @ebevhan wrote: > I'm also a bit confused about the semantics that this patch is applying to > function types. It mostly seems to concern the extra trailing Qualifiers on > CXXMethodDecl to store the addrspac

[PATCH] D55543: [CodeGen] Fix assertion on throwing object with inlined inherited constructor and non-trivial destructor.

2018-12-17 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 178563. vsapsai added a comment. - Test order of destroying parameters to inlined inherited constructor. - [ObjC++] Add test using struct with `__strong` field as a parameter for inlined inherited constructor. CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D54604: Automatic variable initialization

2018-12-17 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc accepted this revision. pcc added a comment. This revision is now accepted and ready to land. LGTM Comment at: test/CodeGenCXX/trivial-auto-var-init-attribute.cpp:13 +void test_attribute_uninitialized() { + [[clang::trivial_auto_init("uninitialized")]] int i; + used(i); -

[PATCH] D54604: Automatic variable initialization

2018-12-17 Thread JF Bastien via Phabricator via cfe-commits
jfb updated this revision to Diff 178566. jfb added a comment. - Update attribute test. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54604/new/ https://reviews.llvm.org/D54604 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clan

[PATCH] D55616: Emit ASM input in a constant context

2018-12-17 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM with a minor nit, but give a couple days for @jyknight to add any more comments. Comment at: test/CodeGen/builtin-constant-p.c:2 +// RUN: %clang_cc1 -triple x86_64-

[PATCH] D55765: Fix use-after-free bug in Tooling.

2018-12-17 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: include/clang/Tooling/Tooling.h:208 std::unique_ptr -buildASTFromCode(const Twine &Code, const Twine &FileName = "input.cc", +buildASTFromCode(StringRef Code, const Twine &FileName = "input.cc", std::shared_ptr PCHConta

[PATCH] D55793: [clang-tidy] Add duplicated access specifier readability check (PR25403)

2018-12-17 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/readability/DuplicatedAccessSpecifiersCheck.cpp:36 + NS != NSEnd; ++NS) { +const auto *decl = *NS; + Type is not obvious here, so please don't use auto. CHANGES SINCE LAST ACTION https://r

[PATCH] D55804: [analyzer] C++17: Fix leak false positives when an object with destructor is returned from the top frame.

2018-12-17 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a_sidorin, george.karpenkov, rnkovacs, Szelethus, mikhail.ramalho, baloghadamsoftware. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, a.sidorin, szepet. The `return_from_top_frame` test demonstrates what happens. Th

[PATCH] D55781: Make CC mangling conditional on the ABI version

2018-12-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added a reviewer: probinson. rjmccall added a comment. I think the core question is whether there are any vendors who care about ABI stability for these attributes who don't care about the bugfix. Speaking for Apple, we would rather have the bugfix. Sony might have different thoughts;

[PATCH] D55771: [AST] Store the callee and argument expressions of CallExpr in a trailing array.

2018-12-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I agree with not packing the argument count in. Comment at: include/clang/AST/Stmt.h:439 +/// trailing objects belonging to CallExpr. +unsigned OffsetToTrailingObjects : 6; }; If we're not packing anything into these bits an

[PATCH] D55616: Emit ASM input in a constant context

2018-12-17 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 178582. void added a comment. Reduce duplication by using multiple check prefixes. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55616/new/ https://reviews.llvm.org/D55616 Files: lib/Basic/TargetInfo.cpp lib/CodeGen/CGStmt.

[PATCH] D54604: Automatic variable initialization

2018-12-17 Thread JF Bastien via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349442: Automatic variable initialization (authored by jfb, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D54604?vs=178566&id=178590#toc Rep

r349442 - Automatic variable initialization

2018-12-17 Thread JF Bastien via cfe-commits
Author: jfb Date: Mon Dec 17 21:12:21 2018 New Revision: 349442 URL: http://llvm.org/viewvc/llvm-project?rev=349442&view=rev Log: Automatic variable initialization Summary: Add an option to initialize automatic variables with either a pattern or with zeroes. The default is still that automatic va

[PATCH] D55543: [CodeGen] Fix assertion on throwing object with inlined inherited constructor and non-trivial destructor.

2018-12-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/test/CodeGenObjCXX/inheriting-constructor-cleanup.mm:10 + // Use variadic args to force inlining the inherited constructor. + Base(const Strong &s, ...) {} +}; To test what I'd like to see, this needs to take `S

[PATCH] D55802: Change CGObjC to use objc intrinsics instead of runtime methods

2018-12-17 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. You're making intrinsics with `weak_external` linkage? I feel like that's going to be unnecessarily awkward in the future, but okay. Repository: rC Clang CHANGES SINCE LAST ACTION h

[PATCH] D55802: Change CGObjC to use objc intrinsics instead of runtime methods

2018-12-17 Thread Pete Cooper via Phabricator via cfe-commits
pete added a comment. In D55802#1334008 , @rjmccall wrote: > You're making intrinsics with `weak_external` linkage? I feel like that's > going to be unnecessarily awkward in the future, but okay. Yeah... i was a little surprised that was possible, but

r349444 - [ExprConstant] Handle compound assignment when LHS has integral type and RHS has floating point type

2018-12-17 Thread Tan S. B. via cfe-commits
Author: cpplearner Date: Mon Dec 17 23:38:06 2018 New Revision: 349444 URL: http://llvm.org/viewvc/llvm-project?rev=349444&view=rev Log: [ExprConstant] Handle compound assignment when LHS has integral type and RHS has floating point type Fixes PR39858 Differential Revision: https://reviews.llvm

[PATCH] D55413: [ExprConstant] Handle compound assignment when LHS has integral type and RHS has floating point type

2018-12-17 Thread S. B. Tam via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349444: [ExprConstant] Handle compound assignment when LHS has integral type and RHS… (authored by cpplearner, committed by ). Changed prior to commit: https://reviews.llvm.org/D55413?vs=178242&id=17859

<    1   2