[PATCH] D35216: [analyzer] Escape symbols when creating std::initializer_list.

2017-07-10 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 105897. NoQ edited the summary of this revision. NoQ added a comment. Herald added a subscriber: mgorny. This other diff implements approach (1) through a draft of a checker (that doesn't model much yet). I had to additionally make sure we already have a region

[PATCH] D34210: Add __has_feature(leak_sanitizer)

2017-07-10 Thread Francis Ricci via Phabricator via cfe-commits
fjricci added a comment. In https://reviews.llvm.org/D34210#804084, @smeenai wrote: > COFF supports weak externals: https://stackoverflow.com/a/11529277/382079. > Would it suffice here? Looks like it could work, thanks. https://reviews.llvm.org/D34210

[PATCH] D35194: [clang-tidy] clang-apply-replacements: Don't insert null entry

2017-07-10 Thread Kevin Funk via Phabricator via cfe-commits
kfunk updated this revision to Diff 105929. kfunk added a comment. Remove unnecessary `sed` line in test driver https://reviews.llvm.org/D35194 Files: clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp test/clang-apply-replacements/Inputs/invalid-files/invalid-files.yaml

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-07-10 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 105932. gtbercea added a comment. Address comments. https://reviews.llvm.org/D34784 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/Driver/Options.td lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload.c Index:

[PATCH] D35194: [clang-tidy] clang-apply-replacements: Don't insert null entry

2017-07-10 Thread Yan Wang via Phabricator via cfe-commits
yawanng added a comment. LGTM. Please wait for Alexander approval. Comment at: clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp:296 + << "' doesn't exist. Ignoring...\n"; +} continue; Maybe add some error message here

[PATCH] D35230: [clang] buildFixItInsertionLine should use Hints of the same FID and LineNo

2017-07-10 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh created this revision. Fix bug https://bugs.llvm.org/show_bug.cgi?id=33734 https://reviews.llvm.org/D35230 Files: lib/Frontend/TextDiagnostic.cpp Index: lib/Frontend/TextDiagnostic.cpp === ---

[clang-tools-extra] r307601 - [CMake] Use tools template for clangd and modularize

2017-07-10 Thread Petr Hosek via cfe-commits
Author: phosek Date: Mon Jul 10 17:18:07 2017 New Revision: 307601 URL: http://llvm.org/viewvc/llvm-project?rev=307601=rev Log: [CMake] Use tools template for clangd and modularize This makes them usable as distribution components in the build. Differential Revision:

[PATCH] D35216: [analyzer] Escape symbols when creating std::initializer_list.

2017-07-10 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:810 +public: + CollectReachableSymbolsCallback(ProgramStateRef State) {} + const InvalidatedSymbols () const { return Symbols; } alexshap wrote: > explicit ? This code was moved from

[PATCH] D35041: [analyzer] Fix modeling of bool based types

2017-07-10 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added inline comments. This revision is now accepted and ready to land. Comment at: test/Analysis/enum.cpp:50 + +typedef __INTPTR_TYPE__ intptr_t; +bool testNoCrashOnSwitchEnumBoolConstantCastedFromNullptr() { Nice! Will use in my

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-07-10 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:474 +for (StringRef Opt : OptList) { + AddMArchOption(DAL, Opts, Opt); +} gtbercea wrote: > hfinkel wrote: > > gtbercea wrote: > > > hfinkel wrote: > > > > Shouldn't you be

[PATCH] D35225: [clang-tidy] add regression test to performance-unnecessary-value-param

2017-07-10 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. These tests should be added after https://bugs.llvm.org/show_bug.cgi?id=33734 is fixed. https://reviews.llvm.org/D35225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34981: RecursiveASTVisitor should visit the nested name qualifiers in a template specialisation

2017-07-10 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. I haven't touched any AST code but this looks good to me: it's in line with what's done in TraverseRecordHelper and the test case is comprehensive. Comment at:

[PATCH] D35194: [clang-tidy] clang-apply-replacements: Don't insert null entry

2017-07-10 Thread Kevin Funk via Phabricator via cfe-commits
kfunk updated this revision to Diff 105928. kfunk added a comment. Add test https://reviews.llvm.org/D35194 Files: clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp test/clang-apply-replacements/Inputs/invalid-files/invalid-files.yaml

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-07-10 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. @hfinkel I think I have something that works which is similar to what you were requesting. Please let me know your thoughts! Thanks, --Doru https://reviews.llvm.org/D34784 ___ cfe-commits mailing list

Re: [PATCH] D34896: Enable the new PM + SamlePGO + ThinLTO testing.

2017-07-10 Thread Dehao Chen via cfe-commits
This test was originally added in https://reviews.llvm.org/D34721 with clang change. It's kind of dup of the previous test (-check-prefix=SAMPLEPGO) in terms of testing the clang bits. But we want to make sure the new PM has the expected behavior. I guess it would be acceptable to remove one of

Patch: Preprocessor::HandleIncludeDirective()

2017-07-10 Thread James Skerrett via cfe-commits
The attached patch fixes what looks like a bug in the preprocessor when dealing with missing include files. Currently, if unable to find a file included via an angled include, the preprocessor will generate an error diagnostic even when a recovery path is provided via a callback client. The

r307600 - clang-import-test had some dead code. I did the following to eliminate it:

2017-07-10 Thread Sean Callanan via cfe-commits
Author: spyffe Date: Mon Jul 10 16:47:00 2017 New Revision: 307600 URL: http://llvm.org/viewvc/llvm-project?rev=307600=rev Log: clang-import-test had some dead code. I did the following to eliminate it: - eliminated error handling for the indirect CompilerInstance, which should never generate

r307602 - [clang-import-test] Committed missed update to clang-import-test.cpp

2017-07-10 Thread Sean Callanan via cfe-commits
Author: spyffe Date: Mon Jul 10 17:27:57 2017 New Revision: 307602 URL: http://llvm.org/viewvc/llvm-project?rev=307602=rev Log: [clang-import-test] Committed missed update to clang-import-test.cpp I didn't commit clang-import-test.cpp in r307600, but it had some changes that were part of

[PATCH] D31326: Add option to export fixes to run-clang-tidy.py

2017-07-10 Thread Michael F. Herbst via Phabricator via cfe-commits
mfherbst updated this revision to Diff 105818. mfherbst added a comment. Correct nits and typos. https://reviews.llvm.org/D31326 Files: clang-tidy/tool/run-clang-tidy.py Index: clang-tidy/tool/run-clang-tidy.py === ---

[PATCH] D31326: Add option to export fixes to run-clang-tidy.py

2017-07-10 Thread Michael F. Herbst via Phabricator via cfe-commits
mfherbst added inline comments. Comment at: run-clang-tidy.py:93 +def merge_replacement_files(tmpdir, fixfile): + """Merge all replacement files in a directory into a single fixfile""" + # MainSourceFile: The key is required by the definition inside alexfh

[PATCH] D34331: func.wrap.func.con: Unset function before destroying anything

2017-07-10 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D34331#803105, @dexonsmith wrote: > In https://reviews.llvm.org/D34331#802747, @EricWF wrote: > > > @dexonsmith Mind if I hijack this and check in your changes to > > `` with my tests? > > > Not at all. > > In

[PATCH] D35184: X86 Intrinsics: _bit_scan_forward should not be under #ifdef __RDRND__

2017-07-10 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/D35184 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D35184: X86 Intrinsics: _bit_scan_forward should not be under #ifdef __RDRND__

2017-07-10 Thread Zvi Rackover via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307524: X86 Intrinsics: _bit_scan_forward should not be under #ifdef __RDRND__ (authored by zvi). Repository: rL LLVM https://reviews.llvm.org/D35184 Files: cfe/trunk/lib/Headers/immintrin.h

[PATCH] D35172: Keep the IdentifierInfo in the Token for alternative operator keyword

2017-07-10 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart marked an inline comment as done. ogoffart added inline comments. Comment at: lib/Lex/PPExpressions.cpp:242 switch (PeekTok.getKind()) { - default: // Non-value token. + default: +// If this token's spelling is a pp-identifier, check to see if it is

[PATCH] D35172: Keep the IdentifierInfo in the Token for alternative operator keyword

2017-07-10 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart updated this revision to Diff 105815. ogoffart marked an inline comment as done. ogoffart added a comment. Added check for "#if and_eq" https://reviews.llvm.org/D35172 Files: include/clang/Basic/IdentifierTable.h lib/Lex/PPDirectives.cpp lib/Lex/PPExpressions.cpp

[PATCH] D35172: Keep the IdentifierInfo in the Token for alternative operator keyword

2017-07-10 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart updated this revision to Diff 105816. https://reviews.llvm.org/D35172 Files: include/clang/Basic/IdentifierTable.h lib/Lex/PPDirectives.cpp lib/Lex/PPExpressions.cpp lib/Lex/Preprocessor.cpp test/Parser/MicrosoftExtensions.cpp test/Preprocessor/cxx_oper_keyword.cpp

[PATCH] D35190: __builtin_constant_p should consider the parameter of a constexpr function as constant

2017-07-10 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart created this revision. This allows to do something like: constexpr int func(int x) { return __builtin_constant_p(x) ? compute_constexpr(x) : compute_runtime(x); } This kind of code is accepted by GCC since GCC 4.8. The problem was that EvaluateBuiltinConstantP was

[PATCH] D34624: extra test modifications for D34158

2017-07-10 Thread Melanie Blower via Phabricator via cfe-commits
mibintc updated this revision to Diff 105852. mibintc added a comment. With the latest proposed fix for https://reviews.llvm.org/D34158, a few more test corrections are needed. The correction consists of suppressing the new preprocessor behavior. https://reviews.llvm.org/D34158 preincludes the

r307551 - Avoid white spaces in file names. NFC

2017-07-10 Thread Eric Liu via cfe-commits
Author: ioeric Date: Mon Jul 10 09:05:48 2017 New Revision: 307551 URL: http://llvm.org/viewvc/llvm-project?rev=307551=rev Log: Avoid white spaces in file names. NFC Summary: White spaces in file names are causing Phabricator/SVN to crash. Reviewers: bkramer Subscribers: bogner, cfe-commits

[PATCH] D35216: [analyzer] Escape symbols when creating std::initializer_list.

2017-07-10 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:810 +public: + CollectReachableSymbolsCallback(ProgramStateRef State) {} + const InvalidatedSymbols () const { return Symbols; } explicit ? https://reviews.llvm.org/D35216

[PATCH] D34158: For standards compatibility, preinclude if the file is available

2017-07-10 Thread Melanie Blower via Phabricator via cfe-commits
mibintc updated this revision to Diff 105904. mibintc edited the summary of this revision. mibintc added a comment. I removed the check on -nostdinc; and made some updates to the test cases Repository: rL LLVM https://reviews.llvm.org/D34158 Files: include/clang/Driver/CC1Options.td

[PATCH] D34624: extra test modifications for D34158

2017-07-10 Thread Melanie Blower via Phabricator via cfe-commits
mibintc updated this revision to Diff 105906. mibintc edited the summary of this revision. mibintc added a comment. This patch corresponds to these modifications to clang: https://reviews.llvm.org/D34158?id=105904 Repository: rL LLVM https://reviews.llvm.org/D34624 Files:

[PATCH] D35041: [analyzer] Fix modeling of bool based types

2017-07-10 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added a comment. ping Repository: rL LLVM https://reviews.llvm.org/D35041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35216: [analyzer] Escape symbols when creating std::initializer_list.

2017-07-10 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Or maybe it wasn't a good idea to make two diffs in one place. Dunno. Comment at: test/Analysis/temporaries-callback-order.cpp:28 // CHECK: Bind -// CHECK-NEXT: RegionChanges Apparently, this was caused by the check if the states are

[PATCH] D35216: [analyzer] Escape symbols when creating std::initializer_list.

2017-07-10 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. I've seen a few false positives that appear because we construct C++11 `std::initializer_list` objects with brace initializers, and such construction is not properly modeled. For instance, if a new object is constructed on the heap only to be put into a

[PATCH] D34210: Add __has_feature(leak_sanitizer)

2017-07-10 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. COFF supports weak externals: https://stackoverflow.com/a/11529277/382079. Would it suffice here? https://reviews.llvm.org/D34210 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34624: extra test modifications for D34158

2017-07-10 Thread Melanie Blower via Phabricator via cfe-commits
mibintc planned changes to this revision. mibintc added a comment. I need to redo the test changes. Will resubmit the diff. https://reviews.llvm.org/D34624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: r305850 - Preserve CXX method overrides in ASTImporter

2017-07-10 Thread David Blaikie via cfe-commits
ping on CR feedback On Mon, Jun 26, 2017 at 7:02 PM David Blaikie wrote: > On Tue, Jun 20, 2017 at 2:06 PM Lang Hames via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: lhames >> Date: Tue Jun 20 16:06:00 2017 >> New Revision: 305850 >> >> URL:

[PATCH] D34210: Add __has_feature(leak_sanitizer)

2017-07-10 Thread Kostya Serebryany via Phabricator via cfe-commits
kcc added a comment. In https://reviews.llvm.org/D34210#785828, @rnk wrote: > If LSan is a runtime thing, why not use weak hooks or something to detect > LSan at runtime instead of using a macro? +1 For a run-time-only feature the checking should also be run-time-only (not compile-time)

Re: r307316 - Reject attempts to build a module without -fmodules, rather than silently doing weird things.

2017-07-10 Thread David Blaikie via cfe-commits
What's the reason that passing a module file can't imply -fmodules without the user needing to specify it? On Thu, Jul 6, 2017 at 2:06 PM Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rsmith > Date: Thu Jul 6 14:05:56 2017 > New Revision: 307316 > > URL:

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-07-10 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:474 +for (StringRef Opt : OptList) { + AddMArchOption(DAL, Opts, Opt); +} hfinkel wrote: > gtbercea wrote: > > hfinkel wrote: > > > Shouldn't you be adding all of the

[PATCH] D35212: [Index] Prevent canonical decl becoming nullptr

2017-07-10 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. This patch prevents getCanonicalDecl returning nullptr in case it finds a canonical TemplateDeclaration with no attached TemplatedDecl. Found by running the indexer over a version of the standard library deep inside a template metaprogramming mess.

[PATCH] D16579: Warn if friend function depends on template parameters.

2017-07-10 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 105853. sepavloff added a comment. Updated patch - Remove changes that are not needed anymore, - Function matching is implemented on recursive function instead of TypeVisitor. It support subset of checks, which should be enough for practical use. - Added

[PATCH] D34158: For standards compatibility, preinclude if the file is available

2017-07-10 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. This version is still disabling upon -nostdinc, which doesn't make sense to me. You didn't remove that, nor respond explaining why you think it does make sense? https://reviews.llvm.org/D34158 ___ cfe-commits mailing list

Re: r305860 - Special-case handling of destructors in override lists when dumping ASTs.

2017-07-10 Thread David Blaikie via cfe-commits
Ping for a response from Lang on Richard's CR feedback On Tue, Jun 20, 2017 at 3:30 PM Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On 20 June 2017 at 14:30, Lang Hames via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: lhames >> Date: Tue Jun 20 16:30:43

[PATCH] D35203: Avoid white spaces in file names. NFC

2017-07-10 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307551: Avoid white spaces in file names. NFC (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D35203?vs=105860=105871#toc Repository: rL LLVM https://reviews.llvm.org/D35203

[PATCH] D33644: Add default values for function parameter chunks

2017-07-10 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: lib/Sema/SemaCodeComplete.cpp:2411-2412 + if (DefValue.at(0) != '=') { +// If we don't have = in front of value +return " = " + DefValue; + } Can you expand in the comment on when each of these happens?

[PATCH] D34158: For standards compatibility, preinclude if the file is available

2017-07-10 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D34158#803752, @jyknight wrote: > This version is still disabling upon -nostdinc, which doesn't make sense to > me. I agree. If I pass -nostdinc, so that I then arrange include paths for my own libc headers, I'd then like to pick up the

[PATCH] D34891: Replace assert(0) with llvm_unreachable.

2017-07-10 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. If possible, please upload patches with full context - makes it easier to check around nearby code when reviewing. (the 'arc' tool for phab helps with this) Comment at: include/clang/AST/Redeclarable.h:257-261 if (PassedFirst) { -

[PATCH] D34158: For standards compatibility, preinclude if the file is available

2017-07-10 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added a comment. In https://reviews.llvm.org/D34158#803752, @jyknight wrote: > This version is still disabling upon -nostdinc, which doesn't make sense to > me. > > You didn't remove that, nor respond explaining why you think it does make > sense? You're right, I should remove the

[PATCH] D34512: Add preliminary Cross Translation Unit support library

2017-07-10 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Specifically, ping Richard for new top-level lib in clang. https://reviews.llvm.org/D34512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35203: Avoid white spaces in file names. NFC

2017-07-10 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. This is fine. We should fix phab though. https://reviews.llvm.org/D35203 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: r306809 - Ambiguity might be also uninitialized. Use llvm::Optional.

2017-07-10 Thread David Blaikie via cfe-commits
Which compiler/what warning was flagging this? It doesn't look like Clang builds by default with -Wconditional-uninitialized on, so I'm surprised if Clang was diagnosing anything here. In any case - it's probably better to omit the "WasAmbiguous" flag. Optional already has a flag that says

Re: [PATCH] D34896: Enable the new PM + SamlePGO + ThinLTO testing.

2017-07-10 Thread David Blaikie via cfe-commits
Does this test any code in Clang? (given the test is being committed without any change in Clang, I'm guessing maybe not) - perhaps this test doesn't belong in Clang's test suite? Looks like changes/functionality in LTOPreLinkDefaultPipeline are tested in test/Other/new-pm-thinlto-defaults.ll at

[PATCH] D34913: [clang-tidy] Add a new Android check "android-cloexec-socket"

2017-07-10 Thread Yan Wang via Phabricator via cfe-commits
yawanng updated this revision to Diff 105878. yawanng marked 5 inline comments as done. https://reviews.llvm.org/D34913 Files: clang-tidy/android/AndroidTidyModule.cpp clang-tidy/android/CMakeLists.txt clang-tidy/android/CloexecOpenCheck.cpp clang-tidy/android/CloexecSocketCheck.cpp

[PATCH] D34913: [clang-tidy] Add a new Android check "android-cloexec-socket"

2017-07-10 Thread Yan Wang via Phabricator via cfe-commits
yawanng added inline comments. Comment at: clang-tidy/utils/ASTUtils.h:27 +/// or | | ... +bool hasFlag(const Expr *Flags, const SourceManager , + const LangOptions , const char *CloseOnExecFlag); alexfh wrote: > `hasFlag` is too generic and may

[PATCH] D35203: Avoid white spaces in file names. NFC

2017-07-10 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. White spaces in file names are causing Phabricator/SVN to crash. https://reviews.llvm.org/D35203 Files: test/Driver/crash report spaces.c test/Driver/crash-report-spaces.c Index: test/Driver/crash-report-spaces.c

[PATCH] D35175: New option that adds the DiagID enum name and index to Diagnostic output.

2017-07-10 Thread don hinton via Phabricator via cfe-commits
hintonda updated this revision to Diff 105961. hintonda added a comment. - Make option cc1 only. Rename function, and add test. https://reviews.llvm.org/D35175 Files: include/clang/Basic/DiagnosticIDs.h include/clang/Basic/DiagnosticOptions.def include/clang/Driver/CC1Options.td

[PATCH] D35186: [analyzer] Add annotation for functions taking user-facing strings

2017-07-10 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. Thanks for the patch! This looks very good to me. The one thing I would suggest is renaming 'isAnnotatedAsLocalized()' and 'isAnnotatedTakingLocalized()' to make it more clear what each

[libcxx] r307615 - [libcxx][CMake] Add install path variable to allow overriding the destination

2017-07-10 Thread Petr Hosek via cfe-commits
Author: phosek Date: Mon Jul 10 19:39:50 2017 New Revision: 307615 URL: http://llvm.org/viewvc/llvm-project?rev=307615=rev Log: [libcxx][CMake] Add install path variable to allow overriding the destination This is going to be used by the runtime build in the multi-target setup to allow using

r307603 - [clang-import-test] Test that enumerators and their values are found.

2017-07-10 Thread Sean Callanan via cfe-commits
Author: spyffe Date: Mon Jul 10 17:29:37 2017 New Revision: 307603 URL: http://llvm.org/viewvc/llvm-project?rev=307603=rev Log: [clang-import-test] Test that enumerators and their values are found. Added: cfe/trunk/test/Import/enum/ - copied from r307452,

[PATCH] D35230: [clang] buildFixItInsertionLine should use Hints of the same FID and LineNo

2017-07-10 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. See https://reviews.llvm.org/D35225 for a test case. https://reviews.llvm.org/D35230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r307604 - [analyzer] Start fixing modeling of bool based types

2017-07-10 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Mon Jul 10 17:30:14 2017 New Revision: 307604 URL: http://llvm.org/viewvc/llvm-project?rev=307604=rev Log: [analyzer] Start fixing modeling of bool based types This is a follow up for one of the previous diffs https://reviews.llvm.org/D32328. getTypeSize and with

[PATCH] D35041: [analyzer] Fix modeling of bool based types

2017-07-10 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307604: [analyzer] Start fixing modeling of bool based types (authored by alexshap). Changed prior to commit: https://reviews.llvm.org/D35041?vs=105597=105947#toc Repository: rL LLVM

[libunwind] r307606 - [libunwind][CMake] Add install path variable to allow overriding the destination

2017-07-10 Thread Petr Hosek via cfe-commits
Author: phosek Date: Mon Jul 10 18:12:09 2017 New Revision: 307606 URL: http://llvm.org/viewvc/llvm-project?rev=307606=rev Log: [libunwind][CMake] Add install path variable to allow overriding the destination This is going to be used by the runtime build in the multi-target setup to allow using

[libcxxabi] r307611 - [libcxxabi][CMake] Add install path variable to allow overriding the destination

2017-07-10 Thread Petr Hosek via cfe-commits
Author: phosek Date: Mon Jul 10 18:42:26 2017 New Revision: 307611 URL: http://llvm.org/viewvc/llvm-project?rev=307611=rev Log: [libcxxabi][CMake] Add install path variable to allow overriding the destination This is going to be used by the runtime build in the multi-target setup to allow using

[PATCH] D34534: [libcxx] [test] Fix MSVC warning C4242 "conversion from 'int' to 'const char', possible loss of data".

2017-07-10 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT added a comment. As I've made this exact change in other tests before, I'll commit this soon-ish if there are no comments or objections. https://reviews.llvm.org/D34534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r307594 - IsSpecialLong was only ever set in release mode as all of the uses are in asserts. Wrap in ifndef NDEBUG.

2017-07-10 Thread Eric Christopher via cfe-commits
Author: echristo Date: Mon Jul 10 14:28:54 2017 New Revision: 307594 URL: http://llvm.org/viewvc/llvm-project?rev=307594=rev Log: IsSpecialLong was only ever set in release mode as all of the uses are in asserts. Wrap in ifndef NDEBUG. Modified: cfe/trunk/lib/AST/ASTContext.cpp Modified:

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-07-10 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. I tested the following software, both before and after applying this patch, using RangeConstraintManager. Software, Version, Compile Time (before), Bugs Reported (before), Compile Time (after), Bugs Reported (after) openssl, 1.1.0f, 11 min, 126, 12 min, 126 sqlite,

[libcxx] r307595 - [libc++] Refactoring __sync_* builtins; NFC (Reland)

2017-07-10 Thread Weiming Zhao via cfe-commits
Author: weimingz Date: Mon Jul 10 14:37:35 2017 New Revision: 307595 URL: http://llvm.org/viewvc/llvm-project?rev=307595=rev Log: [libc++] Refactoring __sync_* builtins; NFC (Reland) Summary: Wrap __sync_* builtins with __libcpp_ functions to facility future customizations as atomic operations

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-07-10 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. I've also uploaded the results to https://dcddcc.com/csa https://reviews.llvm.org/D28953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-07-10 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 105913. ddcc marked an inline comment as done. ddcc added a comment. Drop duplicate code https://reviews.llvm.org/D28953 Files: include/clang/StaticAnalyzer/Checkers/SValExplainer.h lib/StaticAnalyzer/Core/SValBuilder.cpp

r307584 - Use DenseMap instead std::map for GVSummaryMapTy

2017-07-10 Thread Dehao Chen via cfe-commits
Author: dehao Date: Mon Jul 10 13:31:37 2017 New Revision: 307584 URL: http://llvm.org/viewvc/llvm-project?rev=307584=rev Log: Use DenseMap instead std::map for GVSummaryMapTy Summary: Frontend change for https://reviews.llvm.org/D35148 Reviewers: tejohnson Reviewed By: tejohnson Subscribers:

[libcxx] r307591 - [libc++] Refactoring __sync_* builtins; NFC

2017-07-10 Thread Weiming Zhao via cfe-commits
Author: weimingz Date: Mon Jul 10 14:02:54 2017 New Revision: 307591 URL: http://llvm.org/viewvc/llvm-project?rev=307591=rev Log: [libc++] Refactoring __sync_* builtins; NFC Summary: Wrap __sync_* builtins with __libcpp_ functions to facility future customizations as atomic operations are

[PATCH] D34955: [Basic] Detect Git submodule version in CMake

2017-07-10 Thread Jordan Rose via Phabricator via cfe-commits
jordan_rose added inline comments. Comment at: lib/Basic/CMakeLists.txt:27 +STRING(REGEX REPLACE "\n" "" file_contents "${file_contents}") +if ("${file_contents}" MATCHES "^gitdir:") + # '.git' is indeed a link to the submodule's Git directory. How

[libcxx] r307593 - Revert "[libc++] Refactoring __sync_* builtins; NFC"

2017-07-10 Thread Weiming Zhao via cfe-commits
Author: weimingz Date: Mon Jul 10 14:23:32 2017 New Revision: 307593 URL: http://llvm.org/viewvc/llvm-project?rev=307593=rev Log: Revert "[libc++] Refactoring __sync_* builtins; NFC" This reverts commit 72ff8866bca49ee7d24c87673293b4ce88a039ec. Removed: libcxx/trunk/include/__atomic_support

r307524 - X86 Intrinsics: _bit_scan_forward should not be under #ifdef __RDRND__

2017-07-10 Thread Zvi Rackover via cfe-commits
Author: zvi Date: Mon Jul 10 00:13:56 2017 New Revision: 307524 URL: http://llvm.org/viewvc/llvm-project?rev=307524=rev Log: X86 Intrinsics: _bit_scan_forward should not be under #ifdef __RDRND__ Summary: The _bit_scan_forward and _bit_scan_reverse intrinsics were accidentally masked under the

[PATCH] D35187: [libclang] Support for querying whether an enum is scoped

2017-07-10 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Thanks for the patch. I have just one minor comment: Comment at: tools/libclang/CIndex.cpp:7815 + const Decl *D = cxcursor::getCursorDecl(C); + const EnumDecl *Enum = D ? dyn_cast_or_null(D) : nullptr; + return (Enum && Enum->isScoped()) ? 1 : 0;

[PATCH] D31326: Add option to export fixes to run-clang-tidy.py

2017-07-10 Thread Michael F. Herbst via Phabricator via cfe-commits
mfherbst updated this revision to Diff 105835. mfherbst added a comment. Correct the nits suggested by alexfh https://reviews.llvm.org/D31326 Files: clang-tidy/tool/run-clang-tidy.py Index: clang-tidy/tool/run-clang-tidy.py

Re: [clang-tools-extra] r303735 - Modify test so that it looks for patterns in stderr as well

2017-07-10 Thread Alexander Kornienko via cfe-commits
Sorry, missed this thread somehow. So, the behavior itself seems incorrect. Clang tools should not be trying to find a compilation database in case the command line has a `--`, but the driver fails to parse it. It should be a hard failure. We also need a reliable test for this behavior (with a

[PATCH] D31326: Add option to export fixes to run-clang-tidy.py

2017-07-10 Thread Michael F. Herbst via Phabricator via cfe-commits
mfherbst added a comment. I do not have commit rights to the svn if that's what you're asking, but I could send the patch to llvm-commits if that makes it easier for you. https://reviews.llvm.org/D31326 ___ cfe-commits mailing list

[PATCH] D31326: Add option to export fixes to run-clang-tidy.py

2017-07-10 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Just noticed another couple of nits, otherwise looks good. Thanks! Do you need me to commit the patch for you? Comment at: clang-tidy/tool/run-clang-tidy.py:158 +

[PATCH] D34913: [clang-tidy] Add a new Android check "android-cloexec-socket"

2017-07-10 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/utils/ASTUtils.h:24 + +/// Check whether a macro flag presents in the given argument. Only consider +/// cases of single match or match

[PATCH] D35175: New option that adds the DiagID enum name and index to Diagnostic output.

2017-07-10 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Thanks, that's pretty cool! How bigger did the clang binary get after you've added all these strings? I feel like this is more of a CC1 option as well. I have some feedback for your additional ideas: > add another option to pass in the index (or enum) to force an

[PATCH] D16403: Add scope information to CFG

2017-07-10 Thread Maxim Ostapenko via Phabricator via cfe-commits
m.ostapenko added a comment. Hi Artem, I'm sorry for a long delay (nasty corporate issues). In https://reviews.llvm.org/D16403#789957, @NoQ wrote: > Maxim, totally thanks for picking this up! > > Could you explain the idea behind `shouldDeferScopeEnd`, maybe in a code > comment before the

Re: [clang-tools-extra] r303735 - Modify test so that it looks for patterns in stderr as well

2017-07-10 Thread Alexander Kornienko via cfe-commits
Benjamin has actually fixed the issue by reverting to the old behavior in r306822. I'll add a test for this behavior anyway. On Mon, Jul 10, 2017 at 11:47 AM, Alexander Kornienko wrote: > Sorry, missed this thread somehow. So, the behavior itself seems > incorrect. Clang

[PATCH] D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way

2017-07-10 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. You are making a pretty good progress! I think right now there is some code duplication that could be reduced, but otherwise, the checker starts to look really good. Comment at: lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp:43 +private: + bool

[PATCH] D16403: Add scope information to CFG

2017-07-10 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D16403#803518, @m.ostapenko wrote: > There is one more thing I'd like to clarify: since e.g. BreakStmt can > terminate multiple scopes, do I need to create ScopeEnd marks for all of them > to make analyzer's work easier? Because right now only

[PATCH] D34430: [Clang][TypoCorrection] Clang hangs in typo correction

2017-07-10 Thread Oleg Ranevskyy via Phabricator via cfe-commits
iid_iunknown added a comment. A gentle reminder about this patch. Repository: rL LLVM https://reviews.llvm.org/D34430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33644: Add default values for function parameter chunks

2017-07-10 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. Ping :) It's quite likely ok now because covered with tests. Check please. https://reviews.llvm.org/D33644 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35200: Don't use mmap on Windows

2017-07-10 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan created this revision. Memory mapping does not make llvm faster (at least I don't see any difference). It also allows llvm not to lock files which is sometimes quite important. https://reviews.llvm.org/D35200 Files: lib/Support/MemoryBuffer.cpp Index: lib/Support/MemoryBuffer.cpp

[clang-tools-extra] r307535 - Improve error message when run from a buffer that doesn't visit a file

2017-07-10 Thread Philipp Stephani via cfe-commits
Author: phst Date: Mon Jul 10 06:49:18 2017 New Revision: 307535 URL: http://llvm.org/viewvc/llvm-project?rev=307535=rev Log: Improve error message when run from a buffer that doesn't visit a file Summary: In this case, users currently get a confusing type error. Make the error message more

[PATCH] D35174: [libc++] Fix unrepresentable enum for clang-cl unstable ABI

2017-07-10 Thread Ben Craig via Phabricator via cfe-commits
bcraig updated this revision to Diff 105845. bcraig edited the summary of this revision. bcraig added a comment. Switched to static consts https://reviews.llvm.org/D35174 Files: include/string Index: include/string === ---

[PATCH] D34512: Add preliminary Cross Translation Unit support library

2017-07-10 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. gentle ping https://reviews.llvm.org/D34512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits