[PATCH] D47603: [analyzer] fix bug with 1-bit APSInt types in Z3ConstraintManager

2018-05-31 Thread Dominic Chen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL333704: [analyzer] fix bug with 1-bit APSInt types in Z3ConstraintManager (authored by ddcc, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D47603

r333704 - [analyzer] fix bug with 1-bit APSInt types in Z3ConstraintManager

2018-05-31 Thread Dominic Chen via cfe-commits
Author: ddcc Date: Thu May 31 15:23:07 2018 New Revision: 333704 URL: http://llvm.org/viewvc/llvm-project?rev=333704&view=rev Log: [analyzer] fix bug with 1-bit APSInt types in Z3ConstraintManager Summary: Clang does not have a corresponding QualType for a 1-bit APSInt, so use the BoolTy and ext

[PATCH] D43341: [clang-doc] Implement reducer portion of the frontend framework

2018-05-31 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 149371. juliehockett marked 13 inline comments as done. juliehockett added a comment. Fixing comments https://reviews.llvm.org/D43341 Files: clang-doc/BitcodeReader.cpp clang-doc/BitcodeReader.h clang-doc/BitcodeWriter.cpp clang-doc/BitcodeWrit

[PATCH] D43341: [clang-doc] Implement reducer portion of the frontend framework

2018-05-31 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett added inline comments. Comment at: clang-doc/tool/ClangDocMain.cpp:181 +doc::writeInfo(I.get(), Buffer); + if (DumpResultToFile("bc", Group.getKey() + ".bc", Buffer)) +return 1; ioeric wrote: > juliehockett wrote: > > ioeric wrot

[PATCH] D46112: Allow _Atomic to be specified on incomplete types

2018-05-31 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. If you don't want to spend too much time on C++, fine; could you add a short Objective-C test instead to make sure the trivially-copyable checks are working? What are the changes to Sema::RequireCompleteTypeImpl supposed to do? Comment at: test/Sema/

[PATCH] D45517: [analyzer] False positive refutation with Z3

2018-05-31 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov requested changes to this revision. george.karpenkov added a comment. This revision now requires changes to proceed. Thanks, this is going in the right direction! Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h:182 + virtual

[PATCH] D45517: [analyzer] False positive refutation with Z3

2018-05-31 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added inline comments. Comment at: lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp:928 + bool isModelFeasible() override { +return Solver.check() != Z3_L_FALSE; + } george.karpenkov wrote: > The semantics of this method is incorrect. It sho

[PATCH] D43667: [clang-doc] Implement a YAML generator

2018-05-31 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 149373. https://reviews.llvm.org/D43667 Files: clang-doc/CMakeLists.txt clang-doc/Generators.cpp clang-doc/Generators.h clang-doc/Representation.h clang-doc/YAMLGenerator.cpp clang-doc/tool/ClangDocMain.cpp test/clang-doc/yaml-comments.cpp

[PATCH] D45517: [analyzer] False positive refutation with Z3

2018-05-31 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho added inline comments. Comment at: lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:2391 +if (!RefutationMgr->isModelFeasible()) + BR.markInvalid("Infeasible constraints", N->getLocationContext()); + } george.karpenkov wrote: > That would

[PATCH] D47557: Filesystem tests: un-confuse write time

2018-05-31 Thread JF Bastien via Phabricator via cfe-commits
jfb updated this revision to Diff 149377. jfb added a comment. - Remove access time checks, simplify existing check, after talking to EricWF on IRC. Repository: rCXX libc++ https://reviews.llvm.org/D47557 Files: test/std/experimental/filesystem/fs.op.funcs/fs.op.last_write_time/last_writ

[PATCH] D45517: [analyzer] False positive refutation with Z3

2018-05-31 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added inline comments. Comment at: lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp:925 + void reset() override { Solver.reset(); } + mikhail.ramalho wrote: > george.karpenkov wrote: > > We don't need `reset` anymore. > We don't need it but the

[PATCH] D47613: Mark __c11_atomic_load as const

2018-05-31 Thread JF Bastien via Phabricator via cfe-commits
jfb created this revision. jfb added reviewers: EricWF, mclow.lists. Herald added subscribers: cfe-commits, christof. C++11 onwards specs the non-member functions atomic_load and atomic_load_explicit as taking the atomic by const (potentially volatile) pointer. C11, in its infinite wisdom, decid

[PATCH] D47564: [Parse] Use CapturedStmt for @finally on MSVC

2018-05-31 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. That's an interesting idea. I don't see any particular reason not to do it this way if you're willing to accept that it's never going to support the full control-flow possibilities of @finally. You will need to add JumpDiagnostics logic to prevent branches out of the

[PATCH] D45517: [analyzer] False positive refutation with Z3

2018-05-31 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho added inline comments. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h:183 + virtual void reset() {} + virtual bool isModelFeasible() { return true; } + virtual void addRangeConstraints(ConstraintRangeTy) {} geo

r333712 - [WebAssembly] Update to the new names for the memory builtin functions.

2018-05-31 Thread Dan Gohman via cfe-commits
Author: djg Date: Thu May 31 17:05:51 2018 New Revision: 333712 URL: http://llvm.org/viewvc/llvm-project?rev=333712&view=rev Log: [WebAssembly] Update to the new names for the memory builtin functions. The WebAssembly committee has decided on the names `memory.size` and `memory.grow` for the memo

[PATCH] D47394: [OpenMP][Clang][NVPTX] Replace bundling with partial linking for the OpenMP NVPTX device offloading toolchain

2018-05-31 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. The error is related to lack of device linking, just like you explained two paragraphs down. This is the error I get: main.o: In function `__cuda_module_ctor': main.cu:(.text+0x674): undefined reference to `__cudaRegisterLinkedBinary__nv_c5b75865' You nailed the p

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

2018-05-31 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Ping. Without this patch, we would have to add binary header maps for tests in https://reviews.llvm.org/D47157 and https://reviews.llvm.org/D47301, which I would like to avoid. https://reviews.llvm.org/D46485 ___ cfe-commit

r333715 - [Coverage] End deferred regions before labels, fixes PR35867

2018-05-31 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Thu May 31 17:37:13 2018 New Revision: 333715 URL: http://llvm.org/viewvc/llvm-project?rev=333715&view=rev Log: [Coverage] End deferred regions before labels, fixes PR35867 A deferred region should end before the start of a label, and should not extend to the start of the la

[PATCH] D47614: [WebAssembly] Hide new Wasm EH behind its feature flag

2018-05-31 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin created this revision. aheejin added reviewers: dschuff, majnemer. Herald added subscribers: cfe-commits, sunfish, jgravelle-google, sbc100. clang's current wasm EH implementation is a non-MVP feature in progress. We had a `-mexception-handling` wasm feature but were not using it. This pat

[PATCH] D45517: [analyzer] False positive refutation with Z3

2018-05-31 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added inline comments. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h:183 + virtual void reset() {} + virtual bool isModelFeasible() { return true; } + virtual void addRangeConstraints(ConstraintRangeTy) {} mi

[PATCH] D47614: [WebAssembly] Hide new Wasm EH behind its feature flag

2018-05-31 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin updated this revision to Diff 149386. aheejin added a comment. - Add a missing conditional statement. I'll still assume this as accepted Repository: rC Clang https://reviews.llvm.org/D47614 Files: lib/CodeGen/CGException.cpp lib/CodeGen/ItaniumCXXABI.cpp test/CodeGenCXX/wasm-eh

[PATCH] D47614: [WebAssembly] Hide new Wasm EH behind its feature flag

2018-05-31 Thread Heejin Ahn via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC333716: [WebAssembly] Hide new Wasm EH behind its feature flag (authored by aheejin, committed by ). Changed prior to commit: https://reviews.llvm.org/D47614?vs=149386&id=149387#toc Repository: rC Cl

r333716 - [WebAssembly] Hide new Wasm EH behind its feature flag

2018-05-31 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Thu May 31 18:01:37 2018 New Revision: 333716 URL: http://llvm.org/viewvc/llvm-project?rev=333716&view=rev Log: [WebAssembly] Hide new Wasm EH behind its feature flag Summary: clang's current wasm EH implementation is a non-MVP feature in progress. We had a `-mexception-hand

[PATCH] D47564: [Parse] Use CapturedStmt for @finally on MSVC

2018-05-31 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. In https://reviews.llvm.org/D47564#1118381, @rjmccall wrote: > That's an interesting idea. I don't see any particular reason not to do it > this way if you're willing to accept that it's never going to support the > full control-flow possibilities of @finally. You wil

[PATCH] D47564: [Parse] Use CapturedStmt for @finally on MSVC

2018-05-31 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D47564#1118423, @smeenai wrote: > In https://reviews.llvm.org/D47564#1118381, @rjmccall wrote: > > > That's an interesting idea. I don't see any particular reason not to do it > > this way if you're willing to accept that it's never going to

[PATCH] D47557: Filesystem tests: un-confuse write time

2018-05-31 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. LGTM after addressing inline comments. Comment at: test/std/experimental/filesystem/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp:257 +TEST_CHECK(LastWriteT

[PATCH] D45517: [analyzer] False positive refutation with Z3

2018-05-31 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho added inline comments. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h:183 + virtual void reset() {} + virtual bool isModelFeasible() { return true; } + virtual void addRangeConstraints(ConstraintRangeTy) {} geo

[PATCH] D47613: Mark __c11_atomic_load as const

2018-05-31 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. LGTM. Repository: rCXX libc++ https://reviews.llvm.org/D47613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D47607: [libcxx] Almost fix some UB in and

2018-05-31 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: libcxx/include/map:617 template union __value_type { This doesn't need to be a union any more; change to class? Comment at: libcxx/include/map:633 +#if _LIBCPP_STD_VER > 14 +return _VSTD::la

r333718 - [Modules] Warning for module declarations lacking 'framework' qualifier

2018-05-31 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Thu May 31 18:26:18 2018 New Revision: 333718 URL: http://llvm.org/viewvc/llvm-project?rev=333718&view=rev Log: [Modules] Warning for module declarations lacking 'framework' qualifier When a module declaration for a framework lacks the 'framework' qualifier, the listed headers

[PATCH] D47616: [CFG] [analyzer] Explain copy elision through construction contexts.

2018-05-31 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet, rnkovacs. Herald added subscribers: cfe-commits, baloghadamsoftware. Copy elision occurs when 1. a temporary object (with its corresponding temporary object construction context) is constr

r333719 - [analyzer] NFC: Track all constructed objects in a single state trait.

2018-05-31 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu May 31 18:59:48 2018 New Revision: 333719 URL: http://llvm.org/viewvc/llvm-project?rev=333719&view=rev Log: [analyzer] NFC: Track all constructed objects in a single state trait. ExprEngine already maintains three internal program state traits to track path-sensitive i

[PATCH] D47303: [analyzer] NFC: Merge object construction related state traits into one.

2018-05-31 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL333719: [analyzer] NFC: Track all constructed objects in a single state trait. (authored by dergachev, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.l

[PATCH] D47607: [libcxx] Almost fix some UB in and

2018-05-31 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Overall this change seems reasonable to me. Thanks for working on this. Initially I was concerned we would hit issues optimizing const objects, but I should have read your description first! Thanks for ensuring Clang doesn't optimize on this. One other concern I have is

[PATCH] D47607: [libcxx] Almost fix some UB in and

2018-05-31 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: libcxx/include/unordered_map:586 union __hash_value_type { typedef _Key key_type; `union` -> `class` Repository: rCXX libc++ https://reviews.llvm.org/D47607 _

[PATCH] D47614: [WebAssembly] Hide new Wasm EH behind its feature flag

2018-05-31 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: lib/CodeGen/CGException.cpp:322 const EHPersonality &CXX = - getCXXPersonality(getTarget().getTriple(), LangOpts); + getCXXPersonality(getTarget().getTriple(), LangOpts, getTarget()); if (&ObjCXX == &CXX)

[PATCH] D47578: Do not enforce absolute path argv0 in windows

2018-05-31 Thread Takuto Ikuta via Phabricator via cfe-commits
takuto.ikuta updated this revision to Diff 149394. takuto.ikuta added a comment. Add test and split function https://reviews.llvm.org/D47578 Files: llvm/lib/Support/Windows/Process.inc llvm/unittests/Support/CommandLineTest.cpp Index: llvm/unittests/Support/CommandLineTest.cpp

[PATCH] D47578: Do not enforce absolute path argv0 in windows

2018-05-31 Thread Takuto Ikuta via Phabricator via cfe-commits
takuto.ikuta marked an inline comment as done. takuto.ikuta added a comment. In https://reviews.llvm.org/D47578#1117874, @rnk wrote: > I think this would be easy to unit test in > llvm/unittests/Support/CommandLine.cpp. We'd just check that the filename is > "SupportTests.exe" on Windows and th

[PATCH] D46024: [clang-format] Add SpaceBeforeCpp11BracedList option.

2018-05-31 Thread Ross Kirsling via Phabricator via cfe-commits
rkirsling updated this revision to Diff 149395. rkirsling added a comment. Resolved another rebase conflict to keep this patch mergeable. Repository: rC Clang https://reviews.llvm.org/D46024 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h lib/Format/Format.cpp l

[PATCH] D47586: Update NRVO logic to support early return (Attempt 2)

2018-05-31 Thread Taiju Tsuiki via Phabricator via cfe-commits
tzik added a reviewer: rsmith. tzik added a comment. rsmith: PTAL. This is the previous attempt plus a fix and a test. The diff is SemaTemplateInstantiateDecl.cpp part that propagate disabled NRVO state to the instantiated local variable. On the previous attempt

[PATCH] D47617: [Analyzer] Fix Z3 crash (PR37646)

2018-05-31 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich created this revision. vlad.tsyrklevich added reviewers: george.karpenkov, NoQ, ddcc. Herald added subscribers: cfe-commits, a.sidorin, szepet, xazax.hun. Fix another Z3ConstraintManager crash, use fixAPSInt() to extend a boolean APSInt. Repository: rC Clang https://reviews.l

[PATCH] D47618: __c11_atomic_load's _Atomic can be const

2018-05-31 Thread JF Bastien via Phabricator via cfe-commits
jfb created this revision. jfb added a reviewer: rsmith. Herald added a subscriber: cfe-commits. C++11 onwards specs the non-member functions atomic_load and atomic_load_explicit as taking the atomic by const (potentially volatile) pointer. C11, in its infinite wisdom, decided to drop the const,

[PATCH] D47618: __c11_atomic_load's _Atomic can be const

2018-05-31 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. Note that I don't touch the OpenCL __constant stuff, because the separate address space means this can be actually read-only, which means you can't cmpxchg for very wide reads. Repository: rC Clang https://reviews.llvm.org/D47618 _

[PATCH] D47557: Filesystem tests: un-confuse write time

2018-05-31 Thread JF Bastien via Phabricator via cfe-commits
jfb updated this revision to Diff 149398. jfb added a comment. - Add back directory test Repository: rCXX libc++ https://reviews.llvm.org/D47557 Files: test/std/experimental/filesystem/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp Index: test/std/experimental/filesystem/fs

[libcxx] r333723 - Filesystem tests: un-confuse write time

2018-05-31 Thread JF Bastien via cfe-commits
Author: jfb Date: Thu May 31 21:59:48 2018 New Revision: 333723 URL: http://llvm.org/viewvc/llvm-project?rev=333723&view=rev Log: Filesystem tests: un-confuse write time Summary: The filesystem test was confused about access versus write / modification time. The spec says: file_time_type last

[PATCH] D47557: Filesystem tests: un-confuse write time

2018-05-31 Thread JF Bastien via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL333723: Filesystem tests: un-confuse write time (authored by jfb, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D47557 Files: libcxx/trunk/te

[PATCH] D47394: [OpenMP][Clang][NVPTX] Replace bundling with partial linking for the OpenMP NVPTX device offloading toolchain

2018-05-31 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. In https://reviews.llvm.org/D47394#1118393, @gtbercea wrote: > The error is related to lack of device linking, just like you explained two > paragraphs down. This is the error I get: > > main.o: In function `__cuda_module_ctor': > main.cu:(.text+0x674): undefined re

[PATCH] D47201: [CUDA] Implement nv_weak attribute for functions

2018-05-31 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. Ping Repository: rC Clang https://reviews.llvm.org/D47201 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46845: [libcxx][c++17] P0083R5: Splicing Maps and Sets

2018-05-31 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: libcxx/include/__hash_table:2261 +_NodeHandle +__hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_extract_unique( +key_type const& __key) If I'm not mistaken, `__node_handle_extract_unique` and `__node_handle_ex

[PATCH] D47070: [CUDA] Upgrade linked bitcode to enable inlining

2018-05-31 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. In https://reviews.llvm.org/D47070#1108803, @tra wrote: > Here's my understanding of what happens: > We've started adding target-features and target-cpu to everything clang > generates. > We also need to link with libdevice (or IR generated by clang which which > h

<    1   2