[PATCH] D41938: [Analyzer] SValBuilder Comparison Rearrangement (with Restrictions and Analyzer Option)

2018-07-18 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D41938#1167313, @NoQ wrote: > There are still performance regressions coming in, and this time it doesn't > look like it's my fault: https://bugs.llvm.org/show_bug.cgi?id=38208 > > I suspect that this might be because we aren't enfo

[PATCH] D46230: For x86_64, gcc 7.2 under Amazon Linux AMI sets its paths to x86_64-amazon-linux

2018-07-18 Thread Jiading Gai via Phabricator via cfe-commits
gaijiading added a comment. In https://reviews.llvm.org/D46230#1167023, @echristo wrote: > In https://reviews.llvm.org/D46230#1166958, @gaijiading wrote: > > > In https://reviews.llvm.org/D46230#1166919, @echristo wrote: > > > > > LGTM. > > > > > > -eric > > > > > > Hi Eric, I do not have commit

[PATCH] D49508: [CodeGen] VisitMaterializeTemporaryExpr(): don't skip NoOp Casts.

2018-07-18 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D49508#1167177, @efriedma wrote: > skipRValueSubobjectAdjustments has to match the rules in `[class.temporary]` > in the standard, which includes skipping over certain explicit casts. I'm this approach because this is what @rsmith suggest

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

2018-07-18 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone updated this revision to Diff 156210. Quuxplusone edited the summary of this revision. Quuxplusone added a comment. Remove some incorrect `noexcept` from ``. I noticed this because the calls to `__clang_call_terminate` showed up on Godbolt. But the pessimization is still there even w

[PATCH] D49508: [CodeGen] VisitMaterializeTemporaryExpr(): don't skip NoOp Casts.

2018-07-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I think it would be reasonable to set a flag on `ImplicitCastExpr`s that are actually semantically part of an explicit cast. I don't think that would be hard to get Sema to do, either by passing a flag down to the code that builds those casts or just by retroactively

[PATCH] D48661: [Fixed Point Arithmetic] Fixed Point Constant

2018-07-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/Basic/FixedPoint.h:64 + +class APFixedPoint { + public: rjmccall wrote: > This should get a documentation comment describing the class. You should > mention that, like `APSInt`, it carries all of the sem

[PATCH] D49083: [HIP] Register/unregister device fat binary only once

2018-07-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Thanks for the comment. Comment at: lib/CodeGen/CGCUDANV.cpp:444 +auto HandleValue = +CtorBuilder.CreateAlignedLoad(GpuBinaryHandle, CGM.getPointerAlign()); +llvm::Constant *Zero = llvm::Constant::getNullValue(HandleValue->getType());

[PATCH] D49523: [clangd] Add support for per-file override compilation command

2018-07-18 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. Interesting! We also have a need for passing compilation commands in a context where there is no compile_commands.json, but we were thinking of putting this in a "didChangeConfiguration" message so that all the commands would be available even before files are opened.

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-18 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- marked an inline comment as done. 0x8000- added inline comments. Comment at: test/clang-tidy/readability-magic-numbers.cpp:16 +void BuggyFunction() { + int BadLocalInt = 6; + // CHECK-MESSAGES: :[[@LINE-1]]:21: warning: magic number integer literal 6 [readabili

[PATCH] D45444: [clang-tidy] implement new check for const-correctness

2018-07-18 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. Any plans for fix-its that will add the suggested 'const' qualifiers? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45444 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-18 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 156203. 0x8000- added a comment. Herald added subscribers: kbarton, nemanjai. Significant refactoring to address review comments - mainly to reduce duplication and implement in functional style. cppcoreguidelines-avoid-magic-numbers is documented as

[PATCH] D49518: [VFS] Emit an error when a file isn't located in any directory.

2018-07-18 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Need to double check what tests we have when using relative path names at the root level. I'd like to make the behavior consistent because a file name is a specific case of relative paths. So far there are no assertions and no errors but file lookup doesn't seem to be w

[PATCH] D49502: [CMake] Support statically linking dependencies only to shared or static library

2018-07-18 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: libcxx/lib/CMakeLists.txt:269 +AND (TARGET cxxabi_static OR HAVE_LIBCXXABI)) +#if ((TARGET ${LIBCXX_CXX_ABI_LIBRARY}) OR +#(${LIBCXX_CXX_ABI_LIBRARY} MATCHES "cxxabi(_static|_shared)?" AND HAVE_LIBCXXABI)) ---

[PATCH] D49502: [CMake] Support statically linking dependencies only to shared or static library

2018-07-18 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 156201. phosek marked 2 inline comments as done. Repository: rCXX libc++ https://reviews.llvm.org/D49502 Files: libcxx/CMakeLists.txt libcxx/cmake/Modules/HandleLibCXXABI.cmake libcxx/lib/CMakeLists.txt libcxxabi/CMakeLists.txt libcxxabi/src/CMake

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-18 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:209 + +// Helper function that converts ELF relocatable into raw machine code that +// can be executed in memory. Returns size of machine code. Did you look at using LLVM'

[PATCH] D47894: [clang]: Add support for "-fno-delete-null-pointer-checks"

2018-07-18 Thread Manoj Gupta via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337433: [clang]: Add support for "-fno-delete-null-pointer-checks" (authored by manojgupta, committed by ). Changed prior to commit: https://reviews.llvm.org/D47894?vs=155891&id=156195#toc Repository:

r337433 - [clang]: Add support for "-fno-delete-null-pointer-checks"

2018-07-18 Thread Manoj Gupta via cfe-commits
Author: manojgupta Date: Wed Jul 18 17:44:52 2018 New Revision: 337433 URL: http://llvm.org/viewvc/llvm-project?rev=337433&view=rev Log: [clang]: Add support for "-fno-delete-null-pointer-checks" Summary: Support for this option is needed for building Linux kernel. This is a very frequently reque

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-18 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added a comment. The files Object.h Object.cpp llvm-objcopy.h are from llvm/tools/llvm-obj-copy with only slight modifications, mostly deleting irrelevant parts. Repository: rC Clang https://reviews.llvm.org/D49526 ___ cfe-c

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-18 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman created this revision. emmettneyman added reviewers: morehouse, kcc. Herald added subscribers: cfe-commits, mgorny. Herald added a reviewer: alexshap. Made changes to the llvm-proto-fuzzer - Added loop vectorizer optimization pass in order to have two IR versions - Updated old fuzz t

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-18 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. I think this requires a separate discussion - do we accept magic values only when they are used directly to initialize a constant of the same type? Or do we allow them generically when they are used to initialize any constant? Or do we only accept several layers of

[PATCH] D45898: [SemaCXX] Mark destructor as referenced

2018-07-18 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. ping Repository: rC Clang https://reviews.llvm.org/D45898 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-18 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- marked 8 inline comments as done. 0x8000- added inline comments. Comment at: docs/clang-tidy/checks/readability-magic-numbers.rst:33 + + return -3; // FILENOTFOUND + } Quuxplusone wrote: > I notice you changed `-1` to `-3`. Is `return -1` n

[PATCH] D49083: [HIP] Register/unregister device fat binary only once

2018-07-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 156184. yaxunl marked 4 inline comments as done. yaxunl added a comment. Added comments about thread safety of ctor functions. https://reviews.llvm.org/D49083 Files: lib/CodeGen/CGCUDANV.cpp test/CodeGenCUDA/device-stub.cu Index: test/CodeGenCUDA/device

[PATCH] D49523: [clangd] Add support for per-file override compilation command

2018-07-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Btw, the "extraFlags" extension is still usable with "compilationCommand". Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49523 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/

[PATCH] D49523: [clangd] Add support for per-file override compilation command

2018-07-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: jkorous, sammccall, ilya-biryukov. arphaman added a project: clang-tools-extra. Herald added subscribers: dexonsmith, MaskRay, ioeric. This patch builds on top of the "extra flags" extension added in r307241. It adds the ability to specify

[PATCH] D49112: [Sema] Implement -Wmemset-transposed-args

2018-07-18 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:7984 + if (isa(ThirdArg) && + cast(ThirdArg)->getValue() == 0) { +WarningKind = 0; Quuxplusone wrote: > > Suppress the diagnostic in cases like `memset(ptr, 0xff, PADDING

[PATCH] D49112: [Sema] Implement -Wmemset-transposed-args

2018-07-18 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 156178. erik.pilkington marked 5 inline comments as done. erik.pilkington added a comment. This revision is now accepted and ready to land. In this new patch: - Add support for __builtin_bzero (-Wsuspicious-bzero), improve diagnostics for platforms t

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-18 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- marked 17 inline comments as done. 0x8000- added inline comments. Comment at: clang-tidy/readability/MagicNumbersCheck.cpp:30-32 + for (const std::string &IgnoredValue : IngnoredValuesInput) { +IngnoredValues.push_back(std::stoll(IgnoredValue)); + }

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-18 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: clang-tidy/readability/MagicNumbersCheck.h:52 + + const std::vector IngnoredValuesInput; + std::vector IngnoredValues; `Ignored`. Please spellcheck throughout. Comment at: docs/clang-tidy/checks/

[PATCH] D35388: [libc++] Give extern templates default visibility on gcc

2018-07-18 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. In https://reviews.llvm.org/D35388#1167315, @thomasanderson wrote: > In https://reviews.llvm.org/D35388#1167305, @ldionne wrote: > > > ABI-wise, I think this change is OK. Indeed, if `__type_visibility__` is > > not supported, we're already marking the base template as

[PATCH] D49518: [VFS] Emit an error when a file isn't located in any directory.

2018-07-18 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/lib/Basic/VirtualFileSystem.cpp:1416 +if (NameValueNode) + error(NameValueNode, "file is not located in any directory"); +return nullptr; Not happy with the error message but didn't come up

r337431 - Documentation: fix a typo in the AST Matcher Reference docs.

2018-07-18 Thread James Dennett via cfe-commits
Author: jdennett Date: Wed Jul 18 16:21:31 2018 New Revision: 337431 URL: http://llvm.org/viewvc/llvm-project?rev=337431&view=rev Log: Documentation: fix a typo in the AST Matcher Reference docs. Modified: cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h Modified: cfe/trunk/include/clang/AS

r337430 - Reapply r336660: [Modules] Autoload subdirectory modulemaps with specific LangOpts

2018-07-18 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Wed Jul 18 16:21:19 2018 New Revision: 337430 URL: http://llvm.org/viewvc/llvm-project?rev=337430&view=rev Log: Reapply r336660: [Modules] Autoload subdirectory modulemaps with specific LangOpts Summary: Reproducer and errors: https://bugs.llvm.org/show_bug.cgi?id=37878 look

[PATCH] D49518: [VFS] Emit an error when a file isn't located in any directory.

2018-07-18 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: bruno, benlangmuir. Herald added a subscriber: dexonsmith. Orphaned files prevent us from building a file system tree and cause the assertion > Assertion failed: (NewParentE && "Parent entry must exist"), function > uniqueOverlayTree, file

[PATCH] D48786: [Preprocessor] Stop entering included files after hitting a fatal error.

2018-07-18 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/lib/Lex/PPDirectives.cpp:1875 + // Stop further preprocessing if a fatal error has occurred. Any diagnostics + // we might have raised will not be visible. + if (ShouldEnter && Diags->hasFatalErrorOccurred()) jk

[PATCH] D48559: [clangd] refactoring for XPC transport layer [NFCI]

2018-07-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D48559#1165511, @sammccall wrote: > In https://reviews.llvm.org/D48559#1165172, @jkorous wrote: > > > Hi Sam, thanks for your feedback! > > > > In general I agree that explicitly factoring out the transport layer and > > improving layering wo

[PATCH] D49303: [CodeGen][ObjC] Treat non-escaping blocks as global blocks to make copy/dispose a no-op

2018-07-18 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak planned changes to this revision. ahatanak added a comment. In https://reviews.llvm.org/D49303#1165902, @rjmccall wrote: > Please test that we still copy captures correctly into the block object and > destroy them when the block object is destroyed. There is a bug in my patch where th

[PATCH] D48661: [Fixed Point Arithmetic] Fixed Point Constant

2018-07-18 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 156174. leonardchan marked 3 inline comments as done. Repository: rC Clang https://reviews.llvm.org/D48661 Files: include/clang/AST/ASTContext.h include/clang/Basic/FixedPoint.h include/clang/Basic/TargetInfo.h lib/AST/ASTContext.cpp lib/Basi

[PATCH] D35388: [libc++] Give extern templates default visibility on gcc

2018-07-18 Thread Tom Anderson via Phabricator via cfe-commits
thomasanderson added a comment. In https://reviews.llvm.org/D35388#1167305, @ldionne wrote: > ABI-wise, I think this change is OK. Indeed, if `__type_visibility__` is not > supported, we're already marking the base template as > `__visibility__("default")`, so marking the extern template declar

[PATCH] D41938: [Analyzer] SValBuilder Comparison Rearrangement (with Restrictions and Analyzer Option)

2018-07-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Herald added a subscriber: mikhail.ramalho. There are still performance regressions coming in, and this time it doesn't look like it's my fault: https://bugs.llvm.org/show_bug.cgi?id=38208 I suspect that this might be because we aren't enforcing complexity thresholds over a

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-07-18 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 156167. leonardchan added a comment. - Added checks for expressions in statements other than declarations or expression statements Repository: rC Clang https://reviews.llvm.org/D49511 Files: include/clang/AST/Type.h include/clang/Basic/Attr.td

[PATCH] D35388: [libc++] Give extern templates default visibility on gcc

2018-07-18 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. ABI-wise, I think this change is OK. Indeed, if `__type_visibility__` is not supported, we're already marking the base template as `__visibility__("default")`, so marking the extern template declaration with `__visibility__("default")` is not a problem. If `__type_visib

[PATCH] D49492: Run bounds checking sanitizer earlier to make it easier to optimize away its checks.

2018-07-18 Thread Joel Galenson via Phabricator via cfe-commits
jgalenson added a comment. Good call; I had figured that running it earlier might just impede other optimizations, but I forgot that it would also hide size information. I thought this was the easiest approach compared to changing the pass pipeline or adding extra checks in here. But I hadn't

[PATCH] D49476: [Index] Set OrigD before D is changed.

2018-07-18 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi added a comment. Is it possible to add a regression test case ? I assume this is fixing some issue, we should make sure we don't regress again. Repository: rC Clang https://reviews.llvm.org/D49476 ___ cfe-commits mailing list cfe-commits

[PATCH] D49466: Initial implementation of -fmacro-prefix-mapand -ffile-prefix-map

2018-07-18 Thread Dan McGregor via Phabricator via cfe-commits
dankm updated this revision to Diff 156164. dankm retitled this revision from "Initial implementation of -fmacro-prefix-map and -ffile-prefix-map" to "Initial implementation of -fmacro-prefix-mapand -ffile-prefix-map". dankm added a comment. Address some of the comments by erichkeane and joerg.

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-18 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added inline comments. Comment at: clang-tidy/readability/MagicNumbersCheck.cpp:23 + +const char DefaultIgnoredValues[] = "0;1;2;10;100;"; + aaron.ballman wrote: > lebedev.ri wrote: > > aaron.ballman wrote: > > > Why 2, 10, and 100? > > These really s

[PATCH] D49466: Initial implementation of -fmacro-prefix-mapand -ffile-prefix-map

2018-07-18 Thread Dan McGregor via Phabricator via cfe-commits
dankm added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:609 static void addDebugPrefixMapArg(const Driver &D, const ArgList &Args, ArgStringList &CmdArgs) { + for (const Arg *A : Args.filtered(options::OPT_ffile_prefix_map_EQ)) { +StringRef Map = A->getVal

[PATCH] D49492: Run bounds checking sanitizer earlier to make it easier to optimize away its checks.

2018-07-18 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added a comment. Some checks can be removed by asking SCEV for offset bounds, see SafeStack::IsAccessSafe for an example. Repository: rC Clang https://reviews.llvm.org/D49492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:/

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-07-18 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr. leonardchan added a project: clang. This patch adds the `noderef` attribute in clang and checks for dereferences of types that have this attribute. This attribute is currently used by sparse and would like to be po

[PATCH] D49492: Run bounds checking sanitizer earlier to make it easier to optimize away its checks.

2018-07-18 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. This sanitizer has a bit of a strange design compared to other sanitizers; it tries to compute the size of the base object using the IR at the point the pass runs. So the later it runs, the more information it has. Trivial example: static int accumulate(int* foo, i

[PATCH] D49492: Run bounds checking sanitizer earlier to make it easier to optimize away its checks.

2018-07-18 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added a comment. ObjectSizeOffsetEvaluator may fail to trace the address back to the underlying object, and we will end up not inserting the check. Does ChecksUnable statistic go up with this change? Repository: rC Clang https://reviews.llvm.org/D49492

[PATCH] D49508: [CodeGen] VisitMaterializeTemporaryExpr(): don't skip NoOp Casts.

2018-07-18 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. skipRValueSubobjectAdjustments has to match the rules in `[class.temporary]` in the standard, which includes skipping over certain explicit casts. Would it be enough to accumulate the skipped casts into a SmallVector, like we do for the skipped comma operators?

[PATCH] D49492: Run bounds checking sanitizer earlier to make it easier to optimize away its checks.

2018-07-18 Thread Joel Galenson via Phabricator via cfe-commits
jgalenson added a comment. In https://reviews.llvm.org/D49492#1167064, @efriedma wrote: > Are you sure this will actually do what you want, in general? I suspect it > will end up missing bounds checks in some cases because it's running it too > early (before mem2reg/inlining/etc). No, I'm no

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/readability/MagicNumbersCheck.cpp:23 + +const char DefaultIgnoredValues[] = "0;1;2;10;100;"; + lebedev.ri wrote: > aaron.ballman wrote: > > Why 2, 10, and 100? > These really should be a config option. T

[PATCH] D46230: For x86_64, gcc 7.2 under Amazon Linux AMI sets its paths to x86_64-amazon-linux

2018-07-18 Thread Jiading Gai via Phabricator via cfe-commits
gaijiading added a comment. In https://reviews.llvm.org/D46230#1167023, @echristo wrote: > In https://reviews.llvm.org/D46230#1166958, @gaijiading wrote: > > > In https://reviews.llvm.org/D46230#1166919, @echristo wrote: > > > > > LGTM. > > > > > > -eric > > > > > > Hi Eric, I do not have commit

[PATCH] D49360: [analyzer] Add support for more basic_string API in DanglingInternalBufferChecker

2018-07-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: test/Analysis/dangling-internal-buffer.cpp:175 std::string s; - { -c = s.c_str(); - } - consume(c); // no-warning + c = s.c_str(); // expected-note {{Pointer to dangling buffer was obtained here}} + s.clear(); // expected-no

[PATCH] D49360: [analyzer] Add support for more basic_string API in DanglingInternalBufferChecker

2018-07-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. Let's commit this patch and make another round later, as we gather ideas for better names and messages. https://reviews.llvm.org/D49360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://

[PATCH] D49466: Initial implementation of -fmacro-prefix-mapand -ffile-prefix-map

2018-07-18 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:609 static void addDebugPrefixMapArg(const Driver &D, const ArgList &Args, ArgStringList &CmdArgs) { + for (const Arg *A : Args.filtered(options::OPT_ffile_prefix_map_EQ)) { +StringRef Map = A->getVal

[PATCH] D49421: [CodeComplete] Fix accessibilty of protected members from base class.

2018-07-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: lib/Sema/SemaAccess.cpp:1871-1873 +// The access should be AS_none as we don't know how the member was +// accessed - `AccessedEntity::getAccess` describes what access was used to +// access an entity. aaron.b

[PATCH] D49421: [CodeComplete] Fix accessibilty of protected members from base class.

2018-07-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 156146. ioeric marked an inline comment as done. ioeric added a comment. - addressed review comments. - Addressed review comments. Repository: rC Clang https://reviews.llvm.org/D49421 Files: lib/Sema/SemaAccess.cpp lib/Sema/SemaCodeComplete.cpp test

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-18 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/readability/MagicNumbersCheck.cpp:23 + +const char DefaultIgnoredValues[] = "0;1;2;10;100;"; + aaron.ballman wrote: > Why 2, 10, and 100? These really should be a config option. Repository: rCTE Clang T

[PATCH] D49508: [CodeGen] VisitMaterializeTemporaryExpr(): don't skip NoOp Casts.

2018-07-18 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added reviewers: rsmith, rjmccall, majnemer, efriedma. Herald added a subscriber: cfe-commits. As discussed in PR38166 , we need to be able to distinqush whether the cast we are visiting is actually a cast,

[PATCH] D47474: Implement cpu_dispatch/cpu_specific Multiversioning

2018-07-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. Aside from an `assert` than can be removed, this LGTM on the attribute side of things. Comment at: lib/CodeGen/CodeGenModule.cpp:2446 + const auto *FD = cast(

[PATCH] D49457: DR330: when determining whether a cast casts away constness, consider qualifiers from all levels matching a multidimensional array

2018-07-18 Thread Richard Smith - zygoloid 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 rC337422: DR330: when determining whether a cast casts away constness, consider (authored by rsmith, committed by ). Reposi

[PATCH] D49504: Enable C++2a Chrono Literals

2018-07-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 156143. erichkeane added a comment. @mclow.lists s comments. https://reviews.llvm.org/D49504 Files: lib/Lex/LiteralSupport.cpp test/SemaCXX/cxx2a-user-defined-literals.cpp Index: lib/Lex/LiteralSupport.cpp ==

r337422 - DR330: when determining whether a cast casts away constness, consider

2018-07-18 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Jul 18 13:13:36 2018 New Revision: 337422 URL: http://llvm.org/viewvc/llvm-project?rev=337422&view=rev Log: DR330: when determining whether a cast casts away constness, consider qualifiers from all levels matching a multidimensional array. For example, this allows casting

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/readability/MagicNumbersCheck.cpp:23 + +const char DefaultIgnoredValues[] = "0;1;2;10;100;"; + Why 2, 10, and 100? Comment at: clang-tidy/readability/MagicNumbersCheck.cpp:30-32 + for

[PATCH] D49148: [DEBUGINFO] Disable unsupported debug info options for NVPTX target.

2018-07-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 156139. ABataev added a comment. Renamed function supportsNonDefaultDebugOptions() -> supportsDebugInfoOption(const Arg*). Instead of the enum it accepts and should check one of the debug info options. Repository: rC Clang https://reviews.llvm.org/D4914

r337420 - Add support for __declspec(code_seg("segname"))

2018-07-18 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Wed Jul 18 13:04:48 2018 New Revision: 337420 URL: http://llvm.org/viewvc/llvm-project?rev=337420&view=rev Log: Add support for __declspec(code_seg("segname")) This patch uses CodeSegAttr to represent __declspec(code_seg) rather than building on the existing support for

[PATCH] D49492: Run bounds checking sanitizer earlier to make it easier to optimize away its checks.

2018-07-18 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Are you sure this will actually do what you want, in general? I suspect it will end up missing bounds checks in some cases because it's running it too early (before mem2reg/inlining/etc). Repository: rC Clang https://reviews.llvm.org/D49492

[PATCH] D49504: Enable C++2a Chrono Literals

2018-07-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In https://reviews.llvm.org/D49504#1167045, @mclow.lists wrote: > This looks ok to me - I'm assuming that somewhere there's a test for `int foo > = 0x123d`, so we're sure that didn't get broken. The hex_d SHOULD be testing that, it ensures that the RHS is an integer

[PATCH] D47474: Implement cpu_dispatch/cpu_specific Multiversioning

2018-07-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: include/clang/Basic/Attr.td:851 + let Spellings = [Clang<"cpu_specific">]; + let Args = [VariadicIdentifierArgument<"Cpus">]; + let Subjects = SubjectList<[Function]>; aaron.ballman wrote: > erichkeane wrote: > > a

[PATCH] D49504: Enable C++2a Chrono Literals

2018-07-18 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. This looks ok to me - I'm assuming that somewhere there's a test for `int foo = 0x123d`, so we're sure that didn't get broken. Comment at: test/SemaCXX/cxx2a-user-defined-literals.cpp:8 +namespace std { + struct string {}; + namespace chrono { --

Re: r337381 - Mention clang-cl improvements from r335466 and r336379 in ReleaseNotes.rst

2018-07-18 Thread Kim Gräsman via cfe-commits
This is lovely! Found a bit inline... On Wed, Jul 18, 2018, 14:00 Nico Weber via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: nico > Date: Wed Jul 18 04:55:03 2018 > New Revision: 337381 > > URL: http://llvm.org/viewvc/llvm-project?rev=337381&view=rev > Log: > Mention clang-cl impro

[PATCH] D49504: Enable C++2a Chrono Literals

2018-07-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. erichkeane added reviewers: rsmith, gribozavr, ddunbar, eli.friedman. Herald added a subscriber: cfe-commits. C++2a via http://wg21.link/p0355 permits the library literals of 'd' and 'y'. This patch enables them in the Lexer so that they can be properly parsed.

[PATCH] D46230: For x86_64, gcc 7.2 under Amazon Linux AMI sets its paths to x86_64-amazon-linux

2018-07-18 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. In https://reviews.llvm.org/D46230#1166958, @gaijiading wrote: > In https://reviews.llvm.org/D46230#1166919, @echristo wrote: > > > LGTM. > > > > -eric > > > Hi Eric, I do not have commit access to trunk. Could you commit the change > for me? Thanks. The binaries make

[PATCH] D49421: [CodeComplete] Fix accessibilty of protected members from base class.

2018-07-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaAccess.cpp:1871-1873 +// The access should be AS_none as we don't know how the member was +// accessed - `AccessedEntity::getAccess` describes what access was used to +// access an entity.

[PATCH] D49502: [CMake] Support statically linking dependencies only to shared or static library

2018-07-18 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added inline comments. Comment at: libcxx/CMakeLists.txt:158 +cmake_dependent_option(LIBCXX_ENABLE_STATIC_ABI_LIBRARY_STATIC + "Statically link the ABI library to static library" ON phosek wrote: > Maybe `LIBCXX_ENABLE_STATIC_ABI_LIBRARY_IN_STATIC_LIBR

[PATCH] D49502: [CMake] Support statically linking dependencies only to shared or static library

2018-07-18 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: libcxx/CMakeLists.txt:158 +cmake_dependent_option(LIBCXX_ENABLE_STATIC_ABI_LIBRARY_STATIC + "Statically link the ABI library to static library" ON Maybe `LIBCXX_ENABLE_STATIC_ABI_LIBRARY_IN_STATIC_LIBRARY` would be mor

[PATCH] D49502: [CMake] Support statically linking dependencies only to shared or static library

2018-07-18 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. This came up in Fuchsia. Clang driver, add `-lc++` as a dependency. This is sufficient for shared libc++, but for static user has to manually pass `-lc++abi -lunwind`, so for static libc++ we would actually like to combine both libc++abi and libunwind into a single archi

[PATCH] D49502: [CMake] Support statically linking dependencies only to shared or static library

2018-07-18 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added a reviewer: EricWF. Herald added subscribers: cfe-commits, ldionne, christof, mgorny. Currently it's possible to select whether to statically link unwinder or the C++ ABI library, but this option applies to both the shared and static library. However, in

[PATCH] D47474: Implement cpu_dispatch/cpu_specific Multiversioning

2018-07-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/Attr.td:851 + let Spellings = [Clang<"cpu_specific">]; + let Args = [VariadicIdentifierArgument<"Cpus">]; + let Subjects = SubjectList<[Function]>; erichkeane wrote: > aaron.ballman wrote: >

[PATCH] D46230: For x86_64, gcc 7.2 under Amazon Linux AMI sets its paths to x86_64-amazon-linux

2018-07-18 Thread Jiading Gai via Phabricator via cfe-commits
gaijiading added a comment. In https://reviews.llvm.org/D46230#1166919, @echristo wrote: > LGTM. > > -eric Hi Eric, I do not have commit access to trunk. Could you commit the change for me? Thanks. Repository: rC Clang https://reviews.llvm.org/D46230 ___

r337417 - [analyzer] Remove a debug print that was accidentally left around.

2018-07-18 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jul 18 11:44:40 2018 New Revision: 337417 URL: http://llvm.org/viewvc/llvm-project?rev=337417&view=rev Log: [analyzer] Remove a debug print that was accidentally left around. No functional change intended. Modified: cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cp

[PATCH] D46230: For x86_64, gcc 7.2 under Amazon Linux AMI sets its paths to x86_64-amazon-linux

2018-07-18 Thread Jiading Gai via Phabricator via cfe-commits
gaijiading added a comment. Thanks very much for the comments and the review. Repository: rC Clang https://reviews.llvm.org/D46230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46230: For x86_64, gcc 7.2 under Amazon Linux AMI sets its paths to x86_64-amazon-linux

2018-07-18 Thread Eric Christopher via Phabricator via cfe-commits
echristo accepted this revision. echristo added a comment. This revision is now accepted and ready to land. LGTM. -eric Repository: rC Clang https://reviews.llvm.org/D46230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

[PATCH] D46230: For x86_64, gcc 7.2 under Amazon Linux AMI sets its paths to x86_64-amazon-linux

2018-07-18 Thread Jiading Gai via Phabricator via cfe-commits
gaijiading updated this revision to Diff 156117. gaijiading added a comment. Include the full context in the update diff. Repository: rC Clang https://reviews.llvm.org/D46230 Files: lib/Driver/ToolChains/Gnu.cpp test/Driver/Inputs/ami_linux_tree/usr/lib/gcc/x86_64-amazon-linux/7/crtbegin

[PATCH] D49148: [DEBUGINFO] Disable unsupported debug info options for NVPTX target.

2018-07-18 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. In https://reviews.llvm.org/D49148#1166859, @echristo wrote: > In https://reviews.llvm.org/D49148#1166429, @ABataev wrote: > > > In https://reviews.llvm.org/D49148#1165826, @echristo wrote: > > > > > I think you should break it out on an option by option basis. Just > >

[PATCH] D49458: Support implicit _Atomic struct load / store

2018-07-18 Thread JF Bastien via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL337410: Support implicit _Atomic struct load / store (authored by jfb, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D49458 Files: cfe/trunk/l

r337410 - Support implicit _Atomic struct load / store

2018-07-18 Thread JF Bastien via cfe-commits
Author: jfb Date: Wed Jul 18 11:01:41 2018 New Revision: 337410 URL: http://llvm.org/viewvc/llvm-project?rev=337410&view=rev Log: Support implicit _Atomic struct load / store Summary: Using _Atomic to do implicit load / store is just a seq_cst atomic_load / atomic_store. Stores currently assert

[PATCH] D49458: Support implicit _Atomic struct load / store

2018-07-18 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. I'm sure there are other bugs around `_Atomic`, please file a bug an CC me if that's the case. I'll commit this fix for now. Repository: rC Clang https://reviews.llvm.org/D49458 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D49083: [HIP] Register/unregister device fat binary only once

2018-07-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: lib/CodeGen/CGCUDANV.cpp:444 +auto HandleValue = +CtorBuilder.CreateAlignedLoad(GpuBinaryHandle, CGM.getPointerAlign()); +llvm::Constant *Zero = llvm::Constant::getNullValue(HandleValue->getType()); rjmcc

[PATCH] D46230: For x86_64, gcc 7.2 under Amazon Linux AMI sets its paths to x86_64-amazon-linux

2018-07-18 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. It's usually preferred to submit patches with full context - it'll make this a bit easier if you do please? Repository: rC Clang https://reviews.llvm.org/D46230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D49148: [DEBUGINFO] Disable unsupported debug info options for NVPTX target.

2018-07-18 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. In https://reviews.llvm.org/D49148#1166429, @ABataev wrote: > In https://reviews.llvm.org/D49148#1165826, @echristo wrote: > > > I think you should break it out on an option by option basis. Just warning > > on "non-standard" options won't make as much sense to end user

[PATCH] D49083: [HIP] Register/unregister device fat binary only once

2018-07-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGCUDANV.cpp:444 +auto HandleValue = +CtorBuilder.CreateAlignedLoad(GpuBinaryHandle, CGM.getPointerAlign()); +llvm::Constant *Zero = llvm::Constant::getNullValue(HandleValue->getType()); yax

[PATCH] D49294: Sema: Fix explicit address space cast in C++

2018-07-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaOverload.cpp:3150 + !getLangOpts().OpenCLCPlusPlus) +return false; + yaxunl wrote: > rjmccall wrote: > > It's not really OpenCL C++ that's special here, it's the possibility of > > promotions betw

[libcxx] r337406 - Update the synopsis for for C++20. No functional change.

2018-07-18 Thread Marshall Clow via cfe-commits
Author: marshall Date: Wed Jul 18 10:37:51 2018 New Revision: 337406 URL: http://llvm.org/viewvc/llvm-project?rev=337406&view=rev Log: Update the synopsis for for C++20. No functional change. Modified: libcxx/trunk/include/chrono Modified: libcxx/trunk/include/chrono URL: http://llvm.org/

[PATCH] D48862: [OpenEmbedded] Fix lib paths for OpenEmbedded targets

2018-07-18 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Ping 3 for reviews please. https://reviews.llvm.org/D48862 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49466: Initial implementation of -fmacro-prefix-mapand -ffile-prefix-map

2018-07-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: include/clang/Lex/Preprocessor.h:155 + /// A prefix map for __FILE__ and __BASEFILE__ + llvm::SmallDenseMap MacroPrefixMap; + Scrolling back up, put this implementation as close to the debug implementation as you c

[PATCH] D46190: For a used declaration, mark any associated usings as referenced.

2018-07-18 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. A bunch of style comments. Maybe try clang-format-diff. Comment at: include/clang/Sema/SemaInternal.h:91 Var->markUsed(SemaRef.Context); + SemaRef.MarkUsingReferenced(Var, Loc, /*CXXScopeSpec*=*/nullptr, RefExpr); } The comments

  1   2   >