[PATCH] D55628: Add support for "labels" on push/pop directives in #pragma clang attribute

2018-12-18 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Just to be clear, this is just a syntactic change from what I originally posted. The old `#pragma clang attribute push NoReturn (...)` is semantically equivalent to the new `#pragma clang attribute NoReturn.push (...)` CHANGES SINCE LAST ACTION https://review

[PATCH] D55878: [Driver] Use --hash-style=gnu instead of both on FreeBSD

2018-12-18 Thread Simon Atanasyan via Phabricator via cfe-commits
atanasyan added inline comments. Comment at: lib/Driver/ToolChains/FreeBSD.cpp:160 +if (ToolChain.getTriple().getOSMajorVersion() >= 9) + CmdArgs.push_back("--hash-style=gnu"); CmdArgs.push_back("--enable-new-dtags"); MaskRay wrote: > I can't find r

[PATCH] D55628: Add support for "labels" on push/pop directives in #pragma clang attribute

2018-12-18 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 178837. erik.pilkington added a comment. After looking through some users of `#pragma clang attribute`, I don't think that the begin/end solution is what we want here. Some users of this attribute write macros that can expand to different attributes

[PATCH] D55868: [Fixed Point Arithmetic] Fixed Point Addition Constant Expression Evaluation

2018-12-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/include/clang/Basic/FixedPoint.h:98 public: + APFixedPoint() = default; APFixedPoint(const llvm::APInt &Val, const FixedPointSemantics &Sema) This should be documented to describe what it does. Does it cr

[PATCH] D55850: [OpenCL] Allow address spaces as method qualifiers

2018-12-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. You're gating on OpenCL C++ in several places in this patch, but I don't think you need to. This extension should be available to anyone using address spaces and C++. Comment at: lib/Parse/ParseDecl.cpp:6162 +} + } + Th

[PATCH] D55878: [Driver] Use --hash-style=gnu instead of both on FreeBSD

2018-12-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 178836. MaskRay added a comment. . Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55878/new/ https://reviews.llvm.org/D55878 Files: lib/Driver/ToolChains/FreeBSD.cpp test/Driver/freebsd.c Index: test/Driver/freebsd.c ==

[PATCH] D55869: Convert some ObjC retain/release msgSends to runtime calls

2018-12-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. So, once upon a time this was a problem because we were rewriting the method calls in the runtime itself. Can you explain how that's not a problem now? Do we just expect the runtime to be compiled with the right switch? Comment at: include/clang/Ba

[PATCH] D55878: [Driver] Use --hash-style=gnu instead of both on FreeBSD

2018-12-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: lib/Driver/ToolChains/FreeBSD.cpp:160 +if (ToolChain.getTriple().getOSMajorVersion() >= 9) + CmdArgs.push_back("--hash-style=gnu"); CmdArgs.push_back("--enable-new-dtags");

[PATCH] D55662: [Sema][ObjC] Do not warn about repeated uses of weak variables when the variables are accessed in an unevaluated context.

2018-12-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D55662#1335402 , @ahatanak wrote: > Sorry, please ignore my previous comment. I was looking at the wrong place. > > The following code reaches `Sema::BuildDecltypeType` without going through > `ActOnDecltypeExpression`: > >

[PATCH] D55878: [Driver] Use --hash-style=gnu instead of both on FreeBSD

2018-12-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: emaste, brooks, dim. Herald added subscribers: cfe-commits, atanasyan, fedor.sergeev, arichardson, sdardis. rtld started to support DT_GNU_HASH since rS234841 (2013). libexec/rtld-elf/rtld.c:symlook_obj uses DT_GNU_HASH when it is present an

[PATCH] D53891: [LTO] Add option to enable LTOUnit splitting, and disable unless needed

2018-12-18 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. You can't emit the type tests by default with `-flto=thin` because not all programs adhere to the conditions described in `LTOVisibility.rst` and we can't silently break those programs; it is something that they will need to explicitly opt in to. We should be able to emit t

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

2018-12-18 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D55616#1335587 , @vitalybuka wrote: > Looks like it's broken by this patch > > clang: > /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm/tools/clang/lib/AST/ExprConstant.cpp:11055: > llvm::APSInt clang::Expr::EvaluateKnownCo

r349604 - Use "EvaluateAsRValue" instead of as a known int, because if it's not a known

2018-12-18 Thread Bill Wendling via cfe-commits
Author: void Date: Tue Dec 18 20:54:29 2018 New Revision: 349604 URL: http://llvm.org/viewvc/llvm-project?rev=349604&view=rev Log: Use "EvaluateAsRValue" instead of as a known int, because if it's not a known integer we want to emit a diagnostic instead of asserting. Modified: cfe/trunk/lib/S

r349603 - Revert accidentally included code.

2018-12-18 Thread Bill Wendling via cfe-commits
Author: void Date: Tue Dec 18 20:36:42 2018 New Revision: 349603 URL: http://llvm.org/viewvc/llvm-project?rev=349603&view=rev Log: Revert accidentally included code. Modified: cfe/trunk/lib/Sema/SemaStmtAsm.cpp Modified: cfe/trunk/lib/Sema/SemaStmtAsm.cpp URL: http://llvm.org/viewvc/llvm-pr

[PATCH] D55875: [analyzer] pr38668: RegionStore: Do not attempt to cast loaded values of non-scalar types.

2018-12-18 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. These seems reasonable, although it does also seem like there could be quite a few unintended consequences that we haven't discovered yet. I'm also a bit worried about the change in the analyzer's behavior on copy(). Do you have a sense of how much of an effect this w

[PATCH] D55873: [analyzer] CStringChecker: Fix a crash when an argument of a weird type is encountered.

2018-12-18 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. LGTM. Comment at: test/Analysis/string.cpp:23 + +// A similarly weird override outside of the class. +void *memcpy(void *, const S &, size_t); I'm pret

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

2018-12-18 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. This seems reasonable to me, although I have a question inline about why you are using `makeZeroElementRegion()`. Comment at: lib/StaticAnalyzer/Core/ExprEngineCXX.cpp

[PATCH] D55875: [analyzer] pr38668: RegionStore: Do not attempt to cast loaded values of non-scalar types.

2018-12-18 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. It is expected to have the same object (memory region) treated

[PATCH] D55873: [analyzer] CStringChecker: Fix a crash when an argument of a weird type is encountered.

2018-12-18 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. It turns out that it's not all that uncommon to have a C++ ove

[PATCH] D52117: Generate llvm.loop.parallel_accesses instead of llvm.mem.parallel_loop_access metadata.

2018-12-18 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel accepted this revision. hfinkel added a comment. Minor typo noted below, but otherwise, LGTM (to avoid any misunderstanding: this should be committed after the LLVM change lands). Comment at: lib/CodeGen/CGLoopInfo.cpp:341 +for (const LoopInfo &AL : Active) { +

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

2018-12-18 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. Looks like it's broken by this patch clang: /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm/tools/clang/lib/AST/ExprConstant.cpp:11055: llvm::APSInt clang::Expr::EvaluateKnownConstInt(const clang::ASTContext &, SmallVectorImpl *) const: Assertion `Result && "

[PATCH] D55823: [analyzer] Fix backward compatibility issue after D53280 'Emit an error for invalid -analyzer-config inputs'

2018-12-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. These arguments seem to be available during the top-level call, `Driver::BuildCompilation`. I guess we need to stick this somewhere in between. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55823/new/ https://reviews.llvm.org/D55823 _

[PATCH] D55869: Convert some ObjC retain/release msgSends to runtime calls

2018-12-18 Thread Pete Cooper via Phabricator via cfe-commits
pete created this revision. pete added reviewers: rjmccall, ahatanak, erik.pilkington. Herald added a subscriber: cfe-commits. It is faster to directly call the ObjC runtime for methods such as retain/release instead of sending a message to those functions. This is an extension of the work we al

[PATCH] D55853: Ignore ConstantExpr in IgnoreParenNoopCasts

2018-12-18 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/AST/Expr.cpp:2694 while (true) { E = E->IgnoreParens(); Maybe `IgnoreParens` should be doing this itself? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55853/new/ https://reviews.llvm.org/D5

[PATCH] D55868: [Fixed Point Arithmetic] Fixed Point Addition Constant Expression Evaluation

2018-12-18 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: ebevhan, bjope, rjmccall. leonardchan added a project: clang. leonardchan added a parent revision: D53738: [Fixed Point Arithmetic] Fixed Point Addition. This patch includes logic for constant expression evaluation of fixed point ad

[PATCH] D55853: Ignore ConstantExpr in IgnoreParenNoopCasts

2018-12-18 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/AST/Expr.cpp:2722-2725 +if (ConstantExpr *CE = dyn_cast(E)) { + E = CE->getSubExpr(); + continue; +} rnk wrote: > majnemer wrote: > > Just curious, why not go even further and use FullExpr rath

[PATCH] D55823: [analyzer] Fix backward compatibility issue after D53280 'Emit an error for invalid -analyzer-config inputs'

2018-12-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Ugh. No, it doesn't work. It seems that stuff after `-Xclang` is not included in `Args` (even at the beginning of the function, when no arguments are consumed), and it doesn't make it into `CmdArgs` (yet?). Test passes because `-analyzer-config` is a sub-string of the //fil

[PATCH] D55862: [Sema] Don't try to account for the size of an incomplete type in CheckArrayAccess

2018-12-18 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: lib/Sema/SemaChecking.cpp:12381 +// It is possible that the base type is incomplete (see PR39746), even +// though the effective type is complete. In this case we have no info +// about the size of the base type and so skip

[PATCH] D55865: [ObjC] Add a new attribute to opt-out of implicit callee retain/release in ARC

2018-12-18 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rjmccall, ahatanak, jordan_rose, aaron.ballman. Herald added subscribers: dexonsmith, jkorous. This attribute, called "objc_externally_retained", exposes clang's notion of pseudo-`__strong` variables in ARC. Pseudo-strong var

[PATCH] D55862: [Sema] Don't try to account for the size of an incomplete type in CheckArrayAccess

2018-12-18 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added reviewers: bkramer, efriedma. riccibruno added a project: clang. Herald added a subscriber: cfe-commits. It is possible that the base type in CheckArrayAccess is incomplete even though the effective type is complete. In this case don't try to acco

[PATCH] D55861: [OpenMP] Fix data sharing analysis in nested clause

2018-12-18 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny created this revision. jdenny added a reviewer: ABataev. Herald added a subscriber: guansong. Without this patch, clang doesn't complain that X needs explicit data sharing attributes in the following: #pragma omp target teams default(none) { #pragma omp parallel num_threads(X)

[PATCH] D55856: [Driver] Also obey -nostdlib++ when rewriting -lstdc++.

2018-12-18 Thread Dan Albert via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349570: [Driver] Also obey -nostdlib++ when rewriting -lstdc++. (authored by danalbert, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION https://

r349570 - [Driver] Also obey -nostdlib++ when rewriting -lstdc++.

2018-12-18 Thread Dan Albert via cfe-commits
Author: danalbert Date: Tue Dec 18 15:29:35 2018 New Revision: 349570 URL: http://llvm.org/viewvc/llvm-project?rev=349570&view=rev Log: [Driver] Also obey -nostdlib++ when rewriting -lstdc++. Reviewers: pirama Reviewed By: pirama Subscribers: cfe-commits Differential Revision: https://reviews.

[PATCH] D55856: [Driver] Also obey -nostdlib++ when rewriting -lstdc++.

2018-12-18 Thread Dan Albert via Phabricator via cfe-commits
danalbert updated this revision to Diff 178805. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55856/new/ https://reviews.llvm.org/D55856 Files: lib/Driver/Driver.cpp test/Driver/nostdlibxx.cpp Index: test/Driver/nostdlibxx.cpp ===

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

2018-12-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 178802. NoQ added a comment. Wait a minute. In D55804#1334957 , @NoQ wrote: > we would also need to introduce a separate liveness hack to keep it alive No, we wouldn't! With a symbolic region it is fine if it dies too e

[PATCH] D55662: [Sema][ObjC] Do not warn about repeated uses of weak variables when the variables are accessed in an unevaluated context.

2018-12-18 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Sorry, please ignore my previous comment. I was looking at the wrong place. The following code reaches `Sema::BuildDecltypeType` without going through `ActOnDecltypeExpression`: template void overloaded_fn(T); decltype(auto) v5 = &overloaded_fn; `Sema::BuildDec

[PATCH] D55856: [Driver] Also obey -nostdlib++ when rewriting -lstdc++.

2018-12-18 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
pirama added inline comments. Comment at: test/Driver/nostdlibxx.cpp:14 +// RUN: %clangxx -target i686-pc-linux-gnu -### \ +// RUN: -nostdlib++ -stdlib=libc++ -lstdc++%s 2> %t +// RUN: FileCheck --check-prefix=CHECK-RESERVED-LIB-REWRITE < %t %s Missing space

[PATCH] D55856: [Driver] Also obey -nostdlib++ when rewriting -lstdc++.

2018-12-18 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
pirama accepted this revision. pirama added inline comments. This revision is now accepted and ready to land. Comment at: test/Driver/nostdlibxx.cpp:14 +// RUN: %clangxx -target i686-pc-linux-gnu -### \ +// RUN: -nostdlib++ -stdlib=libc++ -lstdc++%s 2> %t +// RUN: FileCheck -

[PATCH] D55856: [Driver] Also obey -nostdlib++ when rewriting -lstdc++.

2018-12-18 Thread Dan Albert via Phabricator via cfe-commits
danalbert created this revision. danalbert added a reviewer: pirama. Repository: rC Clang https://reviews.llvm.org/D55856 Files: lib/Driver/Driver.cpp test/Driver/nostdlibxx.cpp Index: test/Driver/nostdlibxx.cpp === --- test

[PATCH] D55853: Ignore ConstantExpr in IgnoreParenNoopCasts

2018-12-18 Thread Reid Kleckner via Phabricator via cfe-commits
rnk marked an inline comment as done. rnk added inline comments. Comment at: clang/lib/AST/Expr.cpp:2722-2725 +if (ConstantExpr *CE = dyn_cast(E)) { + E = CE->getSubExpr(); + continue; +} majnemer wrote: > Just curious, why not go even further a

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

2018-12-18 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 178793. void added a comment. Fix how prefixes are used in the testcase. 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.cpp lib/

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

2018-12-18 Thread Bill Wendling via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349561: Emit ASM input in a constant context (authored by void, committed by ). Changed prior to commit: https://reviews.llvm.org/D55616?vs=178793&id=178794#toc Repository: rC Clang CHANGES SINCE LA

r349561 - Emit ASM input in a constant context

2018-12-18 Thread Bill Wendling via cfe-commits
Author: void Date: Tue Dec 18 14:54:03 2018 New Revision: 349561 URL: http://llvm.org/viewvc/llvm-project?rev=349561&view=rev Log: Emit ASM input in a constant context Summary: Some ASM input constraints (e.g., "i" and "n") require immediate values. At O0, very few code transformations are perfor

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

2018-12-18 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-

[PATCH] D55719: [OpenMP] parsing and sema support for 'close' map-type-modifier

2018-12-18 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349551: [OPENMP] parsing and sema support for 'close' map-type-modifier (authored by kli, committed by ). Changed prior to commit: https://reviews.llvm.org/D55719?vs=178336&id=178785#toc Repository:

r349551 - [OPENMP] parsing and sema support for 'close' map-type-modifier

2018-12-18 Thread Kelvin Li via cfe-commits
Author: kli Date: Tue Dec 18 14:18:41 2018 New Revision: 349551 URL: http://llvm.org/viewvc/llvm-project?rev=349551&view=rev Log: [OPENMP] parsing and sema support for 'close' map-type-modifier A map clause with the close map-type-modifier is a hint to prefer that the variables are mapped using

[PATCH] D55853: Ignore ConstantExpr in IgnoreParenNoopCasts

2018-12-18 Thread David Majnemer via Phabricator via cfe-commits
majnemer added inline comments. Comment at: clang/lib/AST/Expr.cpp:2722-2725 +if (ConstantExpr *CE = dyn_cast(E)) { + E = CE->getSubExpr(); + continue; +} Just curious, why not go even further and use FullExpr rather than ConstantExpr? CHANGES

[PATCH] D55737: [Utils] Attempt to fix clang.natvis following "[AST] Various optimizations in DeclarationName(Table)"

2018-12-18 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno abandoned this revision. riccibruno added a comment. In D55737#1335245 , @aaron.ballman wrote: > There was a bit more work to be done here, but this got me started. I commit > extra fixes on top of your work in r349547 since I was able to test

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

2018-12-18 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D55793#1335249 , @m4tx wrote: > In D55793#1333661 , @lebedev.ri > wrote: > > > Please add tests with preprocessor (`#if ...`) that will show that it > > ignores disabled code. e.g.:

[PATCH] D55853: Ignore ConstantExpr in IgnoreParenNoopCasts

2018-12-18 Thread Reid Kleckner via Phabricator via cfe-commits
rnk created this revision. rnk added reviewers: void, rsmith. It is ignored by IgnoreParenImpCasts, so it seems reasonable to ignore it here as well. Besides, this preserves behavior from before this AST node was added. Fixes PR39881 https://reviews.llvm.org/D55853 Files: clang/lib/AST/Expr.

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

2018-12-18 Thread Mateusz Maćkowski via Phabricator via cfe-commits
m4tx added a comment. In D55793#1333661 , @lebedev.ri wrote: > 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: >

[PATCH] D55662: [Sema][ObjC] Do not warn about repeated uses of weak variables when the variables are accessed in an unevaluated context.

2018-12-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D55662#1335146 , @ahatanak wrote: > Here are a couple of examples I found running the regression tests: > > int f0(int); > float f0(float); > decltype(f0) f0_a; // this is not valid. > > > > > template > int var_expr

[PATCH] D55737: [Utils] Attempt to fix clang.natvis following "[AST] Various optimizations in DeclarationName(Table)"

2018-12-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. There was a bit more work to be done here, but this got me started. I commit extra fixes on top of your work in r349547 since I was able to test the behavior locally. Thank you for the help! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm

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

2018-12-18 Thread Mateusz Maćkowski via Phabricator via cfe-commits
m4tx marked an inline comment as done. m4tx added a comment. In D55793#1333723 , @riccibruno wrote: > In D55793#1333691 , @m4tx wrote: > > > Don't use `CXXRecordDecl::accessSpecs()`, use unique comments in tests. >

r349547 - Fix errors with the Clang natvis file.

2018-12-18 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Tue Dec 18 13:42:20 2018 New Revision: 349547 URL: http://llvm.org/viewvc/llvm-project?rev=349547&view=rev Log: Fix errors with the Clang natvis file. This updates the FunctionProtoType visualizer to use the proper bits for determining parameter information and the Dec

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

2018-12-18 Thread Mateusz Maćkowski via Phabricator via cfe-commits
m4tx marked 6 inline comments as done. m4tx added inline comments. Comment at: clang-tidy/readability/DuplicatedAccessSpecifiersCheck.cpp:33 + for (DeclContext::specific_decl_iterator + NS(MatchedDecl->decls_begin()), + NSEnd(MatchedDecl->decls_end()); --

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

2018-12-18 Thread Mateusz Maćkowski via Phabricator via cfe-commits
m4tx updated this revision to Diff 178777. m4tx added a comment. Fix variable names, add macro expansion checking as well as macro and inner class tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55793/new/ https://reviews.llvm.org/D55793 Files: clang-tidy/readability/CMakeLists

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

2018-12-18 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Alex, would you mind submitting this since I don't yet have submit privileges? I'll request them shortly, but I'd rather this go one in the meantime. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55765/new/ https://reviews.llvm.org/D5576

[PATCH] D55843: [CodeGen] Handle mixed-width ops in mixed-sign mul-with-overflow lowering

2018-12-18 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349542: [CodeGen] Handle mixed-width ops in mixed-sign mul-with-overflow lowering (authored by vedantk, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.

r349542 - [CodeGen] Handle mixed-width ops in mixed-sign mul-with-overflow lowering

2018-12-18 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Tue Dec 18 13:05:03 2018 New Revision: 349542 URL: http://llvm.org/viewvc/llvm-project?rev=349542&view=rev Log: [CodeGen] Handle mixed-width ops in mixed-sign mul-with-overflow lowering The special lowering for __builtin_mul_overflow introduced in r320902 fixed an ICE seen w

r349540 - [OPENMP][NVPTX]Emit shared memory buffer for reduction as 128 bytes

2018-12-18 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Tue Dec 18 13:01:42 2018 New Revision: 349540 URL: http://llvm.org/viewvc/llvm-project?rev=349540&view=rev Log: [OPENMP][NVPTX]Emit shared memory buffer for reduction as 128 bytes buffer. Seems to me, nvlink has a bug with the proper support of the weakly linked symbols. It

[PATCH] D55843: [CodeGen] Handle mixed-width ops in mixed-sign mul-with-overflow lowering

2018-12-18 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 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55843/new/ https://reviews.llvm.org/D55843 ___ cfe-commits mailing list cfe-commi

[PATCH] D55662: [Sema][ObjC] Do not warn about repeated uses of weak variables when the variables are accessed in an unevaluated context.

2018-12-18 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Here are a couple of examples I found running the regression tests: int f0(int); float f0(float); decltype(f0) f0_a; // this is not valid. template int var_expr(Ts... ts); template auto a_function(Ts... ts) -> decltype(var_expr(ts...)); templat

[PATCH] D55850: [OpenCL] Allow address spaces as method qualifiers

2018-12-18 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Sema/SemaOverload.cpp:2828 // FIXME: OpenCL: Need to consider address spaces unsigned FromQuals = FromFunction->getTypeQuals().getCVRUQualifiers(); I am still mis

[PATCH] D55850: [OpenCL] Allow address spaces as method qualifiers

2018-12-18 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 178767. Anastasia added a comment. Removed FIXME that has been addressed CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55850/new/ https://reviews.llvm.org/D55850 Files: lib/Parse/ParseDecl.cpp lib/Sema/SemaOverload.cpp lib/Sema/SemaType.cpp

[PATCH] D55850: [OpenCL] Allow address spaces as method qualifiers

2018-12-18 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: rjmccall. Herald added a subscriber: yaxunl. This patch allows qualifying methods with address spaces and extends some overloading rules to use those qualifiers. The main use case is to prevent conversions to generic/default address sp

[PATCH] D55848: [clang-tidy] Add export-fixes flag to clang-tidy-diff

2018-12-18 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett created this revision. juliehockett added reviewers: aaron.ballman, hokein, alexfh. juliehockett added a project: clang-tools-extra. Herald added a subscriber: xazax.hun. So that you can export the fixes generated. https://reviews.llvm.org/D55848 Files: clang-tools-extra/clang-ti

[PATCH] D55847: [gn build] Add build file for clang/lib/Basic and dependencies

2018-12-18 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. Herald added subscribers: fedor.sergeev, aheejin, dschuff. Adds a build file for clang-tblgen and an action for running it, and uses that to process all the .td files in include/clang/Basic. Also adds an action to write include/clang/Config/config.h and include/cla

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

2018-12-18 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

[libunwind] r349532 - [SEH] Add initial support for AArch64

2018-12-18 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Tue Dec 18 12:05:59 2018 New Revision: 349532 URL: http://llvm.org/viewvc/llvm-project?rev=349532&view=rev Log: [SEH] Add initial support for AArch64 This doesn't yet implement inspecting the .pdata/.xdata to find the LSDA pointer (in UnwindCursor::getInfoFromSEH), but norm

[PATCH] D55843: [CodeGen] Handle mixed-width ops in mixed-sign mul-with-overflow lowering

2018-12-18 Thread Vedant Kumar via Phabricator via cfe-commits
vsk updated this revision to Diff 178752. vsk marked an inline comment as done. vsk added a comment. - Simplify logic per Eli's review feedback. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55843/new/ https://reviews.llvm.org/D55843 Files: clang/lib/CodeGen/CGBuiltin.cpp clang/tes

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

2018-12-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/test/CodeGenObjCXX/inheriting-constructor-cleanup.mm:25 +// CHECK-LABEL: define void @_Z1fv +// CHECK: call void (%struct.Base*, i8*, ...) @_ZN4BaseC2E6Strongz(%struct.Base* {{.*}}, i8* {{.*}}) +// CHECK-NEXT: call void @_ZN9Inhe

[PATCH] D55843: [CodeGen] Handle mixed-width ops in mixed-sign mul-with-overflow lowering

2018-12-18 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. This looks reasonable. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:1265 +NeedSExt = Op1Info.Signed; +NeedZExt = !Op1Info.Signed; + } else if (Op1Info.Width > Op2Info.Width) { This is a weird way to express this... could you in

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

2018-12-18 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 178746. vsapsai added a comment. - [ObjC++] Pass struct with `__strong` field as a value, not as a reference. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55543/new/ https://reviews.llvm.org/D55543 Files: clang/lib/CodeGen/CGClass.cpp clang/te

[PATCH] D55844: [Fixed Point Arithmetic] Fixed Point Subtraction

2018-12-18 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: ebevhan, bjope, rjmccall. leonardchan added a project: clang. This patch covers subtraction between fixed point types and other fixed point types or integers, using the conversion rules described in 4.1.4 of N1169. Repository: rC

r349525 - [OPENMP][NVPTX]Added extra sync point to the inter-warp copy function.

2018-12-18 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Tue Dec 18 11:20:15 2018 New Revision: 349525 URL: http://llvm.org/viewvc/llvm-project?rev=349525&view=rev Log: [OPENMP][NVPTX]Added extra sync point to the inter-warp copy function. The parallel reduction operation requires an extra synchronization point in the inter-warp c

[PATCH] D55843: [CodeGen] Handle mixed-width ops in mixed-sign mul-with-overflow lowering

2018-12-18 Thread Vedant Kumar via Phabricator via cfe-commits
vsk created this revision. vsk added reviewers: efriedma, tstellar, dtzWill. The special lowering for __builtin_mul_overflow introduced in r320902 fixed an ICE seen when passing mixed-sign operands to the builtin. This patch extends the special lowering to cover mixed-width, mixed-sign operands.

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

2018-12-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Actually, `LiveVariables` analysis is not the right place to deal with this problem; these changes would go into `SymbolReaper` (or directly into `ExprEngine`), because we're dealing with something that depends on the stack frame, while `LiveVariables` analysis only depends

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

2018-12-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D55804#1334106 , @xazax.hun wrote: > Is there any downsides for using symbolic region for the construction target? > For me that would make perfect sense, since this is often modelled by passing > the address of the target into th

[PATCH] D55784: [clang-tidy] Update abseil-duration-comparison to handle macro arguments

2018-12-18 Thread Hyrum Wright via Phabricator via cfe-commits
hwright added a comment. @aaron.ballman I am both grateful and sad that I don't possess the same macro creativity as you do. :) (I'm also sad that the various clang APIs aren't as well documented as I hoped. The current solution works well, but it took a while and a bit of consultation with s

[PATCH] D55784: [clang-tidy] Update abseil-duration-comparison to handle macro arguments

2018-12-18 Thread Hyrum Wright via Phabricator via cfe-commits
hwright updated this revision to Diff 178733. hwright marked 3 inline comments as done. hwright added a comment. Another test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55784/new/ https://reviews.llvm.org/D55784 Files: clang-tidy/abseil/DurationComparisonCheck.cpp clang-tidy/ab

[PATCH] D55792: Allow direct navigation to static analysis checker documentation through SARIF exports

2018-12-18 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. This is awesome. Please wait for either @NoQ or @george.karpenkov to have the final say. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55792/new/ https://reviews.llvm.org/D5579

[PATCH] D55654: [clang] [Driver] [NetBSD] Add -D_REENTRANT when using sanitizers

2018-12-18 Thread Michał Górny via Phabricator via cfe-commits
mgorny marked 2 inline comments as done. mgorny added inline comments. Comment at: lib/Driver/ToolChains/NetBSD.cpp:465 + const SanitizerArgs &SanArgs = getSanitizerArgs(); + if (SanArgs.needsAsanRt() || SanArgs.needsHwasanRt() || + SanArgs.needsDfsanRt() || SanArgs.needsL

[PATCH] D55654: [clang] [Driver] [NetBSD] Add -D_REENTRANT when using sanitizers

2018-12-18 Thread Michał Górny via Phabricator via cfe-commits
mgorny updated this revision to Diff 178701. mgorny edited the summary of this revision. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55654/new/ https://reviews.llvm.org/D55654 Files: lib/Driver/ToolChains/NetBSD.cpp lib/Driver/ToolChains/NetBSD.h Index: lib/Driver/ToolChains/NetB

[PATCH] D55832: [clang] [Driver] Add .hasAnySanitizer() to SanitizerArgs

2018-12-18 Thread Michał Górny via Phabricator via cfe-commits
mgorny created this revision. mgorny added reviewers: krytarowski, vitalybuka, samsonov, pcc. Add a simple method to query whether any sanitizer was enabled, via SanitizerArgs. This will be used in the NetBSD driver to pass additional definitions that are required by all sanitizers. Repository:

[PATCH] D55712: [Driver][PS4] Do not implicitly link against asan or ubsan if -nostdlib or -nodefaultlibs on PS4.

2018-12-18 Thread pierre gousseau via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349508: [Driver][PS4] Do not implicitly link against asan or ubsan if -nostdlib or… (authored by pgousseau, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55

r349508 - [Driver][PS4] Do not implicitly link against asan or ubsan if -nostdlib or -nodefaultlibs on PS4.

2018-12-18 Thread Pierre Gousseau via cfe-commits
Author: pgousseau Date: Tue Dec 18 09:03:35 2018 New Revision: 349508 URL: http://llvm.org/viewvc/llvm-project?rev=349508&view=rev Log: [Driver][PS4] Do not implicitly link against asan or ubsan if -nostdlib or -nodefaultlibs on PS4. NFC for targets other than PS4. Respect -nostdlib and -nodefa

[PATCH] D55830: [clang] [Basic] Correct description of SanitizerSet.empty()

2018-12-18 Thread Michał Górny via Phabricator via cfe-commits
mgorny created this revision. mgorny added reviewers: bkramer, samsonov, krytarowski. It seems to have gotten inverted. Repository: rC Clang https://reviews.llvm.org/D55830 Files: include/clang/Basic/Sanitizers.h Index: include/clang/Basic/Sanitizers.h ===

[PATCH] D55712: [Driver][PS4] Do not implicitly link against asan or ubsan if -nostdlib or -nodefaultlibs on PS4.

2018-12-18 Thread pierre gousseau via Phabricator via cfe-commits
pgousseau added a comment. In D55712#1334603 , @probinson wrote: > I missed that filcab had said ok internally. Go ahead Pierre. Will do! Thanks for reviewing. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55712/new/ h

[PATCH] D55828: [clang] [Driver] Disable -faddrsig by default on NetBSD

2018-12-18 Thread Michał Górny via Phabricator via cfe-commits
mgorny created this revision. mgorny added reviewers: krytarowski, pcc. Avoid passing -faddrsig by default on NetBSD. This platform is still using old GNU binutils that crashes on executables containing those sections. Repository: rC Clang https://reviews.llvm.org/D55828 Files: lib/Driver

[PATCH] D55437: [Index] Index declarations in lambda expression.

2018-12-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 178688. hokein marked an inline comment as done. hokein added a comment. Fix a nit. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55437/new/ https://reviews.llvm.org/D55437 Files: lib/Index/IndexBody.cpp test/Index/cxx11-

[PATCH] D55437: [Index] Index declarations in lambda expression.

2018-12-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 178687. hokein added a comment. Rebase and simplify the test. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55437/new/ https://reviews.llvm.org/D55437 Files: lib/Index/IndexBody.cpp test/Index/cxx11-lambdas.cpp Index: t

r349506 - [NFC] Fix usage of Builder.insert(new Bitcast...)in CodeGenFunction

2018-12-18 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Tue Dec 18 08:22:21 2018 New Revision: 349506 URL: http://llvm.org/viewvc/llvm-project?rev=349506&view=rev Log: [NFC] Fix usage of Builder.insert(new Bitcast...)in CodeGenFunction This is exactly a "CreateBitCast", so refactor this to get rid of a 'new'. Note that this s

[PATCH] D54945: This commit adds a chapter about clang-tidy integrations

2018-12-18 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: docs/clang-tidy/index.rst:262 + +Clang-tidy integrated +- So how about moving this chapter to a separate page and adding a link to it at the top of this document? While certainly useful, the informati

[PATCH] D55784: [clang-tidy] Update abseil-duration-comparison to handle macro arguments

2018-12-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/abseil-duration-comparison.cpp:131 + // We should still transform the expression inside this macro invocation +#define VALUE_IF(v, e) v ? (e) : 0 + int a = VALUE_IF(1, 5 > absl::ToDoubleSeconds(d1)); -

[PATCH] D55792: Allow direct navigation to static analysis checker documentation through SARIF exports

2018-12-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D55792#1334644 , @Szelethus wrote: > Global nit: I guess having both DESC and DOCS as variable/macro arg names is > confusing. Can we instead use DOCSURI/DocsUri? Sure, I'll make that change. > In D55792#1334339

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

2018-12-18 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. Thanks, looks great. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55771/new/ https://reviews.llvm.org/D55771 __

[PATCH] D55224: [clangd] Introduce loading of shards within auto-index

2018-12-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/index/Background.cpp:259 + // if this thread sees the older version but finishes later. This should + // be rare in practice. + DigestIt.first->second = Hash; ilya-biryukov wrote: > > "should be ra

[PATCH] D55818: [clangd] Unify path canonicalizations in the codebase

2018-12-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 178685. kadircet marked 2 inline comments as done. kadircet added a comment. - Address comments Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55818/new/ https://reviews.llvm.org/D55818 Files: clangd/SourceCo

[PATCH] D55818: [clangd] Unify path canonicalizations in the codebase

2018-12-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 7 inline comments as done. kadircet added inline comments. Comment at: clangd/SourceCode.h:91 +/// possible. +llvm::Expected getCanonicalPath(const FileEntry *F, + const SourceManager &SourceMgr); ilya-b

  1   2   >