[PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant

2018-05-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGExprAgg.cpp:964 +RHS = CGF.EmitAnyExpr(E->getRHS()).getAggregatePointer(); +break; + case TEK_Complex: It looks like we don't actually support any aggregate types here, which I think is fine

[PATCH] D45177: CStringChecker, check strlcpy/strlcat

2018-05-04 Thread David CARLIER via Phabricator via cfe-commits
devnexen added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:1485 + state = CheckOverlap(C, state, CE->getArg(2), Dst, srcExpr); + NoQ wrote: > This crashes on the old tests for the checker. I guess that's because the > normal

[PATCH] D45177: CStringChecker, check strlcpy/strlcat

2018-05-04 Thread David CARLIER via Phabricator via cfe-commits
devnexen updated this revision to Diff 145352. https://reviews.llvm.org/D45177 Files: lib/StaticAnalyzer/Checkers/CStringChecker.cpp test/Analysis/bsd-string.c Index: test/Analysis/bsd-string.c === --- /dev/null +++

[PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant

2018-05-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/AST/ComparisonCategories.h:71 + /// standard library. The key is a value of ComparisonCategoryResult. + mutable llvm::DenseMap Objects; + EricWF wrote: > rjmccall wrote: > > We expect

[PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant

2018-05-04 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 12 inline comments as done. EricWF added inline comments. Comment at: lib/Sema/SemaExpr.cpp:9825 +LHS = S.ImpCastExprToType(LHS.get(), IntType, CK_IntegralCast); +RHS = S.ImpCastExprToType(RHS.get(), IntType, CK_IntegralCast); +LHSType = RHSType =

[PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant

2018-05-04 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 18 inline comments as done. EricWF added inline comments. Comment at: include/clang/AST/ASTContext.h:1986 + /// This object needs to be initialized by Sema the first time it checks + /// a three-way comparison. + ComparisonCategories CompCategories;

[PATCH] D44934: [analyzer] Improve the modeling of `memset()`.

2018-05-04 Thread Henry Wong via Phabricator via cfe-commits
MTC added a comment. In https://reviews.llvm.org/D44934#1088771, @NoQ wrote: > Hmm, ok, it seems that i've just changed the API in > https://reviews.llvm.org/D46368, and i should have thought about this use > case. Well, at least i have some background understanding of these problems > now.

[PATCH] D46489: [HIP] Let assembler output bitcode for amdgcn

2018-05-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I think the right solution here is to make a CompileJobAction with type TY_LLVM_BC in the first place. You should get the advice of a driver expert, though. https://reviews.llvm.org/D46489 ___ cfe-commits mailing list

[PATCH] D46475: [HIP] Set proper triple and offload kind for the toolchain

2018-05-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Driver/Driver.cpp:554 + }) || + IsHIP) { const ToolChain *HostTC = C.getSingleOffloadToolChain(); It seems to me that it wouldn't be too hard to do your TODO here; it's basically just

[PATCH] D46489: [HIP] Let assembler output bitcode for amdgcn

2018-05-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: rjmccall, tra. amdgcn does not support linking of object files, therefore let assembler output bitcode for HIP for amdgcn. https://reviews.llvm.org/D46489 Files: lib/Driver/ToolChains/Clang.cpp Index: lib/Driver/ToolChains/Clang.cpp

[PATCH] D46473: [HIP] Let clang-offload-bundler support HIP

2018-05-04 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. LGTM. https://reviews.llvm.org/D46473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D46472: [HIP] Support offloading by linkscript

2018-05-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. The IRGen aspects of this seem reasonable, modulo a comment change. I don't feel qualified to judge the driver change. Comment at: lib/CodeGen/CGCUDANV.cpp:317 + if (GpuBinaryFileName.empty() && !IsHIP) return nullptr; Is

[PATCH] D46471: [HIP] Add hip offload kind

2018-05-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Otherwise LGTM. Comment at: lib/Driver/Compilation.cpp:201 + // not compiled again if there are already failures. It is OK to abort the + // CUDA pipeline on errors. + if (A->isOffloading(Action::OFK_Cuda) || A->isOffloading(Action::OFK_HIP))

[PATCH] D46487: [HIP] Diagnose unsupported host triple

2018-05-04 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. LGTM. https://reviews.llvm.org/D46487 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D46464: [ThinLTO] Support opt remarks options with distributed ThinLTO backends

2018-05-04 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc accepted this revision. pcc added a comment. LGTM Repository: rC Clang https://reviews.llvm.org/D46464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45174: non-zero-length bit-fields should make a class non-empty

2018-05-04 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. Okay, LGTM. Repository: rC Clang https://reviews.llvm.org/D45174 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D46464: [ThinLTO] Support opt remarks options with distributed ThinLTO backends

2018-05-04 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added inline comments. Comment at: test/CodeGen/thinlto-diagnostic-handler-remarks-with-hotness.ll:14 +; RUN: %clang -O2 -x ir %t.o -fthinlto-index=%t.thinlto.bc -fsave-optimization-record -fdiagnostics-show-hotness -o %t2.o -c +; RUN: cat %t2.opt.yaml.thin.0.yaml |

[PATCH] D46464: [ThinLTO] Support opt remarks options with distributed ThinLTO backends

2018-05-04 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 145348. tejohnson added a comment. Update test for change to pass -1 as the Task ID for distributed backends, and to reflect companion llvm change (https://reviews.llvm.org/D46488). Repository: rC Clang https://reviews.llvm.org/D46464 Files:

[PATCH] D46487: [HIP] Diagnose unsupported host triple

2018-05-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: rjmccall, tra. https://reviews.llvm.org/D46487 Files: include/clang/Basic/DiagnosticDriverKinds.td lib/Driver/Driver.cpp test/Driver/cuda-bad-arch.cu Index: test/Driver/cuda-bad-arch.cu

r331578 - Fix a couple places that immediately called operator-> on the result of dyn_cast.

2018-05-04 Thread Craig Topper via cfe-commits
Author: ctopper Date: Fri May 4 18:58:26 2018 New Revision: 331578 URL: http://llvm.org/viewvc/llvm-project?rev=331578=rev Log: Fix a couple places that immediately called operator-> on the result of dyn_cast. It looks like it safe to just use cast for both cases. Modified:

[libcxx] r331575 - [libcxx] [test] Fix MSVC x64 truncation warning.

2018-05-04 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft Date: Fri May 4 18:40:24 2018 New Revision: 331575 URL: http://llvm.org/viewvc/llvm-project?rev=331575=rev Log: [libcxx] [test] Fix MSVC x64 truncation warning. warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data Requesting post-commit review.

[libcxx] r331576 - [libcxx] [test] Fix whitespace, NFC.

2018-05-04 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft Date: Fri May 4 18:40:27 2018 New Revision: 331576 URL: http://llvm.org/viewvc/llvm-project?rev=331576=rev Log: [libcxx] [test] Fix whitespace, NFC. Strip trailing whitespace and untabify. Modified:

[PATCH] D43928: [analyzer] Correctly measure array size in security.insecureAPI.strcpy

2018-05-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Sorry, i completely forgot about this one :( I think this patch needs `lit` tests, eg. tell the analyzer to analyze a simple strcpy() call on any `-target` with non-8-bit chars and see if it's still crashes or behaves incorrectly. Comment at:

[PATCH] D46485: Add python tool to dump and construct header maps

2018-05-04 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno created this revision. bruno added a reviewer: rsmith. Herald added a subscriber: mgorny. Header maps are binary files used by Xcode, which are used to map header names or paths to other locations. Clang has support for those since its inception, but there's not a lot of header map testing

[PATCH] D45177: CStringChecker, check strlcpy/strlcat

2018-05-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:1485 + state = CheckOverlap(C, state, CE->getArg(2), Dst, srcExpr); + This crashes on the old tests for the checker. I guess that's because the normal `strcpy()` doesn't

[PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant

2018-05-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/AST/ASTContext.h:1986 + /// This object needs to be initialized by Sema the first time it checks + /// a three-way comparison. + ComparisonCategories CompCategories; Is this comment accurate? Because

[PATCH] D46441: [clang][CodeGenCXX] Noalias attr for copy/move constructor arguments

2018-05-04 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:2512 + if (D && isa(D) && + cast(D)->isCopyOrMoveConstructor()) +F->addParamAttr(1, llvm::Attribute::NoAlias); Why does it matter whether it's a copy constructor? The standard

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Ok, i personally think this patch should go in. I think it makes it clear enough that an unsuspecting user would suspect something by reading the flag, and makes the feature hard enough to discover. And i'm happy to support anybody who's going to work on this stuff. -

[PATCH] D46441: [clang][CodeGenCXX] Noalias attr for copy/move constructor arguments

2018-05-04 Thread Anton Bikineev via Phabricator via cfe-commits
AntonBikineev updated this revision to Diff 145332. AntonBikineev added a comment. Herald added subscribers: aheejin, sbc100. I've moved setting noalias-attribute down to IR-function creation. This is needed in the context of emitting a constructor call when the definition of the constructor is

LLVM buildmaster will be restarted tonight

2018-05-04 Thread Galina Kistanova via cfe-commits
Hello everyone, LLVM buildmaster will be restarted after 6PM Pacific time today. Thanks Galina ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46155: Add warning flag -Wordered-compare-function-pointers.

2018-05-04 Thread Eli Friedman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331570: Add warning flag -Wordered-compare-function-pointers. (authored by efriedma, committed by ). Repository: rC Clang https://reviews.llvm.org/D46155 Files:

r331570 - Add warning flag -Wordered-compare-function-pointers.

2018-05-04 Thread Eli Friedman via cfe-commits
Author: efriedma Date: Fri May 4 17:09:51 2018 New Revision: 331570 URL: http://llvm.org/viewvc/llvm-project?rev=331570=rev Log: Add warning flag -Wordered-compare-function-pointers. The C standard doesn't allow comparisons like "f1 < f2" (where f1 and f2 are function pointers), but we allow

[PATCH] D44934: [analyzer] Improve the modeling of `memset()`.

2018-05-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Hmm, ok, it seems that i've just changed the API in https://reviews.llvm.org/D46368, and i should have thought about this use case. Well, at least i have some background understanding of these problems now. Sorry for not keeping eye on this problem. In

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-04 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. > In this sense bug reports against abandoned alpha checkers (which are, > unfortunately, the majority) aren't very useful. In most cases it's just too > easy to see how broken they are. Although the majority are like that, not all of them are. Some like the

[PATCH] D46403: [CFI] Force LLVM to die if the implicit blacklist files cannot be found.

2018-05-04 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc accepted this revision. pcc added a comment. LGTM https://reviews.llvm.org/D46403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46403: [CFI] Force LLVM to die if the implicit blacklist files cannot be found.

2018-05-04 Thread Vedant Kumar via Phabricator via cfe-commits
vsk accepted this revision. vsk added a comment. This revision is now accepted and ready to land. In https://reviews.llvm.org/D46403#1088759, @pcc wrote: > We should be installing `compiler-rt/lib/cfi/cfi_blacklist.txt`, no? Oh, I see. This is already taken care of, then. @cmtice This looks

[PATCH] D46403: [CFI] Force LLVM to die if the implicit blacklist files cannot be found.

2018-05-04 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. We should be installing `compiler-rt/lib/cfi/cfi_blacklist.txt`, no? https://reviews.llvm.org/D46403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46403: [CFI] Force LLVM to die if the implicit blacklist files cannot be found.

2018-05-04 Thread Caroline Tice via Phabricator via cfe-commits
cmtice added a comment. vsk: Are you asking me to put together a cfi blacklist to ship in the resource directory in the default install as part of this code review? Or is that something you want to see in a different code reivew? https://reviews.llvm.org/D46403

[PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant

2018-05-04 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked an inline comment as done. EricWF added inline comments. Comment at: lib/CodeGen/CGExprAgg.cpp:971 + auto EmitCmpRes = [&](const VarDecl *VD) { +return CGF.CGM.GetAddrOfGlobalVar(VD); + }; rsmith wrote: > Perhaps directly emit the constant

[PATCH] D46464: [ThinLTO] Support opt remarks options with distributed ThinLTO backends

2018-05-04 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 Repository: rC Clang https://reviews.llvm.org/D46464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D46464: [ThinLTO] Support opt remarks options with distributed ThinLTO backends

2018-05-04 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked an inline comment as done. tejohnson added a comment. Fixed the output file as suggested. Also note that this test will fail and can't go in until after https://reviews.llvm.org/D46387 Repository: rC Clang https://reviews.llvm.org/D46464

[PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant

2018-05-04 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/AST/ExprConstant.cpp:8829 + return EvaluateComparisonBinaryOperator(Info, E, OnSuccess, [&]() { +return ExprEvaluatorBaseTy::VisitBinaryOperator(E); + }); It'd be clearer to call `VisitBinCmp` rather than

[PATCH] D46464: [ThinLTO] Support opt remarks options with distributed ThinLTO backends

2018-05-04 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 145321. tejohnson added a comment. Address comments Repository: rC Clang https://reviews.llvm.org/D46464 Files: lib/CodeGen/BackendUtil.cpp lib/Frontend/CompilerInvocation.cpp test/CodeGen/thinlto-diagnostic-handler-remarks-with-hotness.ll

[PATCH] D46187: [Analyzer] getRegisteredCheckers(): handle debug checkers too.

2018-05-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. It seems that you're using debug checkers of the analyzer to gain some free tools for exploring the source code (such as displaying a call graph) for free, right? I believe we could also benefit from a method of extracting the analyzer's `clang -cc1` run-line from

[PATCH] D46176: Add SourceManagerForFile helper which sets up SourceManager and dependencies for a single file with code snippet

2018-05-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Thanks for the comment and suggestion! I've changed this to `SourceManagerForFile` and move it to SourceManager.h, which seems to be a more natural fit. `SourceManagerForFile` sounds like a sensible name to me, but I'm guess there might be a better name...

[PATCH] D46176: Pull helper class Environment from clangFormat into libToolingCore [NFC]

2018-05-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 145318. ioeric added a comment. - Create SourceManagerForFile instead of Environment; put it in SourceManager.h which seems to be a better place. Repository: rC Clang https://reviews.llvm.org/D46176 Files: include/clang/Basic/SourceManager.h

r331565 - [analyzer] Remove untested code in evalLoad.

2018-05-04 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri May 4 16:01:10 2018 New Revision: 331565 URL: http://llvm.org/viewvc/llvm-project?rev=331565=rev Log: [analyzer] Remove untested code in evalLoad. No functional change intended. Modified: cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp Modified:

[PATCH] D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement.

2018-05-04 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang marked 5 inline comments as done. shuaiwang added a comment. I've reverted the handling of DeclRefExpr to volatile after rethinking about it. The purpose of this analyzer is to find whether the given Expr is mutated within a scope, but doesn't really care about external changes. In

[PATCH] D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement.

2018-05-04 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang updated this revision to Diff 145313. shuaiwang added a comment. Revert "DeclRefExpr to volatile handling" part of last update. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45679 Files: clang-tidy/utils/CMakeLists.txt clang-tidy/utils/ExprMutationAnalyzer.cpp

[PATCH] D46464: [ThinLTO] Support opt remarks options with distributed ThinLTO backends

2018-05-04 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: test/CodeGen/thinlto-diagnostic-handler-remarks-with-hotness.ll:14 +; RUN: %clang -O2 -x ir %t.o -fthinlto-index=%t.thinlto.bc -fsave-optimization-record -fdiagnostics-show-hotness -o %t2.o -c +; RUN: cat %t2.opt.yaml.thin.0.yaml |

r331563 - [analyzer] Invalidate union regions properly. Don't hesitate to load later.

2018-05-04 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri May 4 15:19:32 2018 New Revision: 331563 URL: http://llvm.org/viewvc/llvm-project?rev=331563=rev Log: [analyzer] Invalidate union regions properly. Don't hesitate to load later. We weren't invalidating our unions correctly. The previous behavior in

[PATCH] D45241: [analyzer] Invalidate union regions properly. Don't hesitate to load the default binding later.

2018-05-04 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331563: [analyzer] Invalidate union regions properly. Dont hesitate to load later. (authored by dergachev, committed by ). Herald added a subscriber: baloghadamsoftware. Repository: rC Clang

r331562 - [analyzer] pr36458: Fix retrieved value cast for symbolic void pointers.

2018-05-04 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri May 4 15:11:12 2018 New Revision: 331562 URL: http://llvm.org/viewvc/llvm-project?rev=331562=rev Log: [analyzer] pr36458: Fix retrieved value cast for symbolic void pointers. C allows us to write any bytes into any memory region. When loading weird bytes from memory

[PATCH] D46415: [analyzer] pr36458: Fix retrieved value cast for symbolic void pointers.

2018-05-04 Thread Phabricator 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 rC331562: [analyzer] pr36458: Fix retrieved value cast for symbolic void pointers. (authored by dergachev, committed by ).

[PATCH] D46368: [analyzer] pr18953: Zeroing constructors, store binding extents, ASTRecordLayouts.

2018-05-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. > We could work around that by invalidating object contents every time we > detect something fishy. The only reasonable detection i can come up with > would be to detect if we have a coinciding binding (i.e. what the assertion > was previously protecting us from), eg.: >

[PATCH] D46368: [analyzer] pr18953: Zeroing constructors, store binding extents, ASTRecordLayouts.

2018-05-04 Thread Phabricator 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 rL331561: [analyzer] pr18953: Split C++ zero-initialization from default initialization. (authored by dergachev, committed

r331560 - [X86] Correct the attributes on the incssp and rdssp builtins to only have 'nothrow'

2018-05-04 Thread Craig Topper via cfe-commits
Author: ctopper Date: Fri May 4 14:56:43 2018 New Revision: 331560 URL: http://llvm.org/viewvc/llvm-project?rev=331560=rev Log: [X86] Correct the attributes on the incssp and rdssp builtins to only have 'nothrow' Modified: cfe/trunk/include/clang/Basic/BuiltinsX86.def

r331561 - [analyzer] pr18953: Split C++ zero-initialization from default initialization.

2018-05-04 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri May 4 14:56:51 2018 New Revision: 331561 URL: http://llvm.org/viewvc/llvm-project?rev=331561=rev Log: [analyzer] pr18953: Split C++ zero-initialization from default initialization. The bindDefault() API of the ProgramState allows setting a default value for reads

r331559 - [X86] Fix some inconsistent formatting in the first line of our intrinsics headers.

2018-05-04 Thread Craig Topper via cfe-commits
Author: ctopper Date: Fri May 4 14:45:25 2018 New Revision: 331559 URL: http://llvm.org/viewvc/llvm-project?rev=331559=rev Log: [X86] Fix some inconsistent formatting in the first line of our intrinsics headers. Some were too long and some were too short. Modified:

[PATCH] D46224: [analyzer] pr37209: Fix casts of glvalues to references.

2018-05-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. > i'll most likely try to investigate it more carefully, or at least see if it > causes regressions on large codebases, before committing Seemed fine, no visible change. I hope this means that i pattern-matched carefully enough. Repository: rC Clang

r331558 - [analyzer] pr37209: Fix casts of glvalues to references.

2018-05-04 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri May 4 14:39:25 2018 New Revision: 331558 URL: http://llvm.org/viewvc/llvm-project?rev=331558=rev Log: [analyzer] pr37209: Fix casts of glvalues to references. Many glvalue expressions aren't of their respective reference type - they are simply glvalues of their value

[PATCH] D46224: [analyzer] pr37209: Fix casts of glvalues to references.

2018-05-04 Thread Phabricator 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 rC331558: [analyzer] pr37209: Fix casts of glvalues to references. (authored by dergachev, committed by ). Repository:

[PATCH] D45174: non-zero-length bit-fields should make a class non-empty

2018-05-04 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith marked an inline comment as done. rsmith added a comment. Ping. Repository: rC Clang https://reviews.llvm.org/D45174 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45532: [StaticAnalyzer] Checker to find uninitialized fields after a constructor call

2018-05-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp:258-260 +Report->addNote(NoteBuf, +PathDiagnosticLocation::create(FieldChain.getEndOfChain(), +

[PATCH] D46081: [analyzer] Expand conversion check to check more expressions for overflow and underflow

2018-05-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Yep, looks good. This limitation to `DeclRefExpr`s was super conservative. I'll follow up regarding the bugprone category in a week or so on the mailing lists. It's been a long-standing historical

[PATCH] D45212: [HIP] Let CUDA toolchain support HIP language mode and amdgpu

2018-05-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 145297. yaxunl added a comment. clean up code and separate action builder to another review. https://reviews.llvm.org/D45212 Files: include/clang/Driver/Options.td lib/Driver/ToolChains/Cuda.cpp lib/Driver/ToolChains/Cuda.h Index:

[PATCH] D46476: [HIP] Add action builder

2018-05-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: rjmccall, tra. To support separate compile/link and linking across device IR in different source files, a new HIP action builder is introduced. Basically it compiles/links host and device code separately, and embed fat binary in host linking

[PATCH] D46475: [HIP] Set proper triple and offload kind for the toolchain

2018-05-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: rjmccall, tra. Also introduce --hip-link option to indicate HIP for linking. https://reviews.llvm.org/D46475 Files: include/clang/Driver/Options.td lib/Driver/Driver.cpp Index: lib/Driver/Driver.cpp

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D46159#1088050, @alexfh wrote: > As folks noted here, some users prefer to use clang-tidy as a frontend for > the static analyzer. If this helps them test experimental CSA features and > CSA maintainers are willing to accept bug reports and

[PATCH] D46473: [HIP] Let clang-offload-bundler support HIP

2018-05-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: rjmccall, tra. When bundle/unbundle intermediate files for HIP, there may be multiple sub archs, therefore BoundArch needs to be included in the target and output file names for clang-offload-bundler. https://reviews.llvm.org/D46473 Files:

[PATCH] D46472: [HIP] Support offloading by linkscript

2018-05-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: rjmccall, tra. To support linking device code in different source files, it is necessary to embed fat binary at host linking stage. This patch emits an external symbol for fat binary in host codegen, then embed the fat binary by lld through a

[PATCH] D46471: [HIP] Add hip offload kind

2018-05-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: rjmccall, tra. There are quite differences in HIP action builder and action job creation, which justifies to define a separate offload kind. https://reviews.llvm.org/D46471 Files: include/clang/Driver/Action.h lib/Driver/Action.cpp

[PATCH] D45774: [analyzer] cover more cases where a Loc can be bound to constants

2018-05-04 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331556: [analyzer] Treat more const variables and fields as known contants. (authored by dergachev, committed by ). Repository: rC Clang https://reviews.llvm.org/D45774 Files:

r331556 - [analyzer] Treat more const variables and fields as known contants.

2018-05-04 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri May 4 13:52:39 2018 New Revision: 331556 URL: http://llvm.org/viewvc/llvm-project?rev=331556=rev Log: [analyzer] Treat more const variables and fields as known contants. When loading from a variable or a field that is declared as constant, the analyzer will try to

[PATCH] D45774: [analyzer] cover more cases where a Loc can be bound to constants

2018-05-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Two questions for the future: - Should we skip the initializer binding for local variables (and fields/elements of local variables) entirely? Cause we can load from them anyway. And keeping the Store small might be good for performance. - Just in case, do you accidentally

[PATCH] D46464: [ThinLTO] Support opt remarks options with distributed ThinLTO backends

2018-05-04 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson created this revision. tejohnson added a reviewer: pcc. Herald added subscribers: eraman, inglorion, mehdi_amini. Passes down the necessary code ge options to the LTO Config to enable -fdiagnostics-show-hotness and -fsave-optimization-record in the ThinLTO backend for a distributed

[PATCH] D46452: [sanitizer] Don't add --export-dynamic for Myriad

2018-05-04 Thread Walter Lee via Phabricator via cfe-commits
waltl created this revision. waltl added reviewers: vitalybuka, eugenis, alekseyshl. Herald added a subscriber: llvm-commits. This is to work around a bug in some versions of gnu ld, where --export-dynamic implies -shared even if -static is explicitly given. Myriad supports static linking only,

[PATCH] D46403: [CFI] Force LLVM to die if the implicit blacklist files cannot be found.

2018-05-04 Thread Caroline Tice via Phabricator via cfe-commits
cmtice updated this revision to Diff 145266. cmtice added a comment. Added comment to change in source code. https://reviews.llvm.org/D46403 Files: lib/Driver/SanitizerArgs.cpp test/Driver/fsanitize-blacklist.c Index: test/Driver/fsanitize-blacklist.c

[PATCH] D45774: [analyzer] cover more cases where a Loc can be bound to constants

2018-05-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Yup, thanks! I'll commit. https://reviews.llvm.org/D45774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D46450: [Driver] Add mips_Features_Group to Options to improve documentation sorting

2018-05-04 Thread Vince Del Vecchio via Phabricator via cfe-commits
vdelvecc created this revision. vdelvecc added reviewers: sdardis, atanasyan, rsmith. Herald added subscribers: cfe-commits, arichardson. Move all of the MIPS-only options into a new m_mips_Features_Group. Nearly all other targets have most target-specific options grouped, but MIPS does not.

[PATCH] D46449: remove references to nonexistent PragmaTable interface

2018-05-04 Thread Mostyn Bramley-Moore via Phabricator via cfe-commits
mostynb created this revision. Herald added a subscriber: cfe-commits. There does not appear to be a PragmaTable interface in the repository, either on tip-of-tree or historically. Let's remove these references. Repository: rC Clang https://reviews.llvm.org/D46449 Files:

Re: [PATCH] D36610: [Tooling] Add option to getFullyQualifiedName using a custom PritingPolicy

2018-05-04 Thread Sterling Augustine via cfe-commits
Committed as r331552. On Fri, May 4, 2018 at 12:43 PM, Mikhail Ramalho via Phabricator < revi...@reviews.llvm.org> wrote: > mikhail.ramalho updated this revision to Diff 145255. > mikhail.ramalho added a comment. > > Fixed the test case. > > > https://reviews.llvm.org/D36610 > > Files: >

r331552 - Allow modifying the PrintingPolicy for fully qualified names.

2018-05-04 Thread Sterling Augustine via cfe-commits
Author: saugustine Date: Fri May 4 13:12:39 2018 New Revision: 331552 URL: http://llvm.org/viewvc/llvm-project?rev=331552=rev Log: Allow modifying the PrintingPolicy for fully qualified names. Author: mikhail.rama...@gmail.com Modified: cfe/trunk/include/clang/AST/QualTypeNames.h

[PATCH] D46415: [analyzer] pr36458: Fix retrieved value cast for symbolic void pointers.

2018-05-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 145260. NoQ added a comment. Fix test names. Add one more test, just to make sure it works. https://reviews.llvm.org/D46415 Files: lib/StaticAnalyzer/Core/Store.cpp test/Analysis/casts.c Index: test/Analysis/casts.c

[PATCH] D36610: [Tooling] Add option to getFullyQualifiedName using a custom PritingPolicy

2018-05-04 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho updated this revision to Diff 145255. mikhail.ramalho added a comment. Fixed the test case. https://reviews.llvm.org/D36610 Files: include/clang/AST/QualTypeNames.h lib/AST/QualTypeNames.cpp unittests/Tooling/QualTypeNamesTest.cpp Index:

[PATCH] D46403: [CFI] Force LLVM to die if the implicit blacklist files cannot be found.

2018-05-04 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. One problem with this direction is that clang doesn't ship a cfi blacklist in its default install, so, this leaves cfi users with stock toolchains to fend for themselves. I think it'd be a good idea to ship a basic cfi blacklist in clang's resource dir to avoid inadvertent

[PATCH] D46439: Fix incorrect packed aligned structure layout

2018-05-04 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. This looks fine, but needs a test. Comment at: lib/Sema/SemaDecl.cpp:15576 +// Handle attributes before checking for alignas underalignment. +if (Attr) More generally: "before checking the layout". Comment

[PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant

2018-05-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D45476#1088189, @rsmith wrote: > This is significantly more complexity than we need. We're talking about > constexpr variables here, so we just need a `VarDecl* -- you can then ask > that declaration for its evaluated value and emit that

[PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant

2018-05-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D45476#1088180, @EricWF wrote: > OK, As I see it, we have two choices: > > (1) Stash the expressions in Sema and import them like > > In https://reviews.llvm.org/D45476#1088047, @rjmccall wrote: > > > I'm sorry, but this is just not true.

[PATCH] D46403: [CFI] Force LLVM to die if the implicit blacklist files cannot be found.

2018-05-04 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added inline comments. Comment at: lib/Driver/SanitizerArgs.cpp:118 BlacklistFiles.push_back(Path.str()); +else if (BL.Mask == CFI) + D.Diag(clang::diag::err_drv_no_such_file) << Path; vsk wrote: > CFI can be enabled with other sanitizers,

[PATCH] D46403: [CFI] Force LLVM to die if the implicit blacklist files cannot be found.

2018-05-04 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added inline comments. Comment at: lib/Driver/SanitizerArgs.cpp:118 BlacklistFiles.push_back(Path.str()); +else if (BL.Mask == CFI) + D.Diag(clang::diag::err_drv_no_such_file) << Path; CFI can be enabled with other sanitizers, such as ubsan.

[PATCH] D46446: [c++17] Fix assertion on synthesizing deduction guides after a fatal error.

2018-05-04 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added a reviewer: rsmith. After a fatal error Sema::InstantiatingTemplate doesn't allow further instantiation and doesn't push a CodeSynthesisContext. When we tried to synthesize implicit deduction guides from constructors we hit the assertion > Assertion

[PATCH] D46374: Add support for ObjC property name to be a single acronym.

2018-05-04 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. Looks good to me. Repository: rL LLVM https://reviews.llvm.org/D46374 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant

2018-05-04 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. This is significantly more complexity than we need. We're talking about constexpr variables here, so we just need a `VarDecl* -- you can then ask that declaration for its evaluated value and emit that directly. https://reviews.llvm.org/D45476

[PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant

2018-05-04 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. OK, As I see it, we have two choices: (1) Stash the expressions in Sema and import them like In https://reviews.llvm.org/D45476#1088047, @rjmccall wrote: > > Ah. If you want to be able to find this thing without a Sema around in order > to > handle deserialized

[PATCH] D46443: Add missing cstdalign header

2018-05-04 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 updated this revision to Diff 145247. sbc100 added a comment. - revert Repository: rCXX libc++ https://reviews.llvm.org/D46443 Files: include/cstdalign test/libcxx/min_max_macros.sh.cpp test/libcxx/utilities/any/size_and_alignment.pass.cpp Index:

[PATCH] D46403: [CFI] Force LLVM to die if the implicit blacklist files cannot be found.

2018-05-04 Thread Caroline Tice via Phabricator via cfe-commits
cmtice updated this revision to Diff 145243. cmtice added a comment. Updated the error to only occur for CFI blacklist, and added test case. https://reviews.llvm.org/D46403 Files: lib/Driver/SanitizerArgs.cpp test/Driver/fsanitize-blacklist.c Index: test/Driver/fsanitize-blacklist.c

[PATCH] D46443: Add missing cstdalign header

2018-05-04 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 created this revision. Herald added subscribers: cfe-commits, christof, aheejin. Repository: rCXX libc++ https://reviews.llvm.org/D46443 Files: include/cassert include/cstdalign test/libcxx/min_max_macros.sh.cpp test/libcxx/utilities/any/size_and_alignment.pass.cpp Index:

[PATCH] D46431: [x86] Introduce the pconfig intrinsic

2018-05-04 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D46431 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D46435: [x86] Introduce the encl[u|s|v] intrinsics

2018-05-04 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D46435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

  1   2   >