[PATCH] D34233: [CFI] Add ability to explicitly link classes

2017-06-14 Thread Enes Goktas via Phabricator via cfe-commits
egoktas updated this revision to Diff 102641. egoktas added a comment. Remove the edits to CGExpr.cpp which accidentally got included in the diff. https://reviews.llvm.org/D34233 Files: include/clang/Basic/SanitizerBlacklist.h lib/Basic/SanitizerBlacklist.cpp lib/CodeGen/CGVTables.cpp

[PATCH] D34233: [CFI] Add ability to explicitly link classes

2017-06-14 Thread Enes Goktas via Phabricator via cfe-commits
egoktas created this revision. egoktas created this object with visibility "All Users". User can explicitly specify classlinks in a sanitizer blacklist file. During compilation with Control-Flow Integrity (CFI), the specified classes will be linked so that (vtables of) the class type Y can be

[libcxx] r305453 - Renamed some of the newly added tests. No functional change

2017-06-14 Thread Marshall Clow via cfe-commits
Author: marshall Date: Thu Jun 15 00:44:49 2017 New Revision: 305453 URL: http://llvm.org/viewvc/llvm-project?rev=305453=rev Log: Renamed some of the newly added tests. No functional change Added: libcxx/trunk/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp -

[PATCH] D34052: [XRay][clang] Support capturing the implicit `this` argument to C++ class member functions

2017-06-14 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added a comment. @dblaikie it turns out that this is a much simpler change now. PTAL? https://reviews.llvm.org/D34052 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] r305451 - attempt to fix GCC ToT build failures

2017-06-14 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Wed Jun 14 22:50:02 2017 New Revision: 305451 URL: http://llvm.org/viewvc/llvm-project?rev=305451=rev Log: attempt to fix GCC ToT build failures Modified: libcxx/trunk/include/__config Modified: libcxx/trunk/include/__config URL:

r305450 - Correct documentation about the AfterClass clang-format option

2017-06-14 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Wed Jun 14 22:38:08 2017 New Revision: 305450 URL: http://llvm.org/viewvc/llvm-project?rev=305450=rev Log: Correct documentation about the AfterClass clang-format option Modified: cfe/trunk/docs/ClangFormatStyleOptions.rst Modified:

[PATCH] D34198: Fix __has_trivial_destructor crash when the type is incomplete with unknown array bounds.

2017-06-14 Thread Puneetha K via Phabricator via cfe-commits
puneetha updated this revision to Diff 102635. puneetha added a comment. Added testcase. https://reviews.llvm.org/D34198 Files: lib/Sema/SemaExprCXX.cpp test/SemaCXX/type-traits.cpp Index: test/SemaCXX/type-traits.cpp ===

[libcxx] r305448 - Fix another test with modules enabled

2017-06-14 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Wed Jun 14 22:03:45 2017 New Revision: 305448 URL: http://llvm.org/viewvc/llvm-project?rev=305448=rev Log: Fix another test with modules enabled Modified: libcxx/trunk/test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp Modified:

[libcxx] r305447 - remove incorrectly committed assertion

2017-06-14 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Wed Jun 14 22:02:43 2017 New Revision: 305447 URL: http://llvm.org/viewvc/llvm-project?rev=305447=rev Log: remove incorrectly committed assertion Modified: libcxx/trunk/utils/libcxx/test/config.py Modified: libcxx/trunk/utils/libcxx/test/config.py URL:

[PATCH] D31868: [analyzer] Check NULL pointer dereference issue for memset function

2017-06-14 Thread Leslie Zhai via Phabricator via cfe-commits
xiangzhai added a comment. Kindly ping Artem and Anna :) Repository: rL LLVM https://reviews.llvm.org/D31868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] r305446 - Add hack to get --param=enable_modules=true working with a __config_site header

2017-06-14 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Wed Jun 14 21:54:15 2017 New Revision: 305446 URL: http://llvm.org/viewvc/llvm-project?rev=305446=rev Log: Add hack to get --param=enable_modules=true working with a __config_site header Modified: libcxx/trunk/utils/libcxx/test/config.py Modified:

[libcxx] r305445 - Fix test when modules are enabled

2017-06-14 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Wed Jun 14 21:54:12 2017 New Revision: 305445 URL: http://llvm.org/viewvc/llvm-project?rev=305445=rev Log: Fix test when modules are enabled Modified: libcxx/trunk/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.cxx1z.pass.cpp

[PATCH] D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler

2017-06-14 Thread Leslie Zhai via Phabricator via cfe-commits
xiangzhai added a comment. Dear Anna, Long time no see, miss you :) > Should this revision be "abandoned" or is the plan to iterate on it? I wanna the plan to iterate on it, Artem reviewed the patch, and I fixed the issue as he suggested, ran `make check-clang-analysis` also used it for

[libcxx] r305442 - Move external instantiation for __vector_base_common to vector.cpp

2017-06-14 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Wed Jun 14 20:53:12 2017 New Revision: 305442 URL: http://llvm.org/viewvc/llvm-project?rev=305442=rev Log: Move external instantiation for __vector_base_common to vector.cpp Previously the explicit instantiation for this was in locale.cpp, but that didn't make much sense.

r305439 - [Basic] Use a static_assert instead of using the old array of size -1 trick.

2017-06-14 Thread Craig Topper via cfe-commits
Author: ctopper Date: Wed Jun 14 20:27:58 2017 New Revision: 305439 URL: http://llvm.org/viewvc/llvm-project?rev=305439=rev Log: [Basic] Use a static_assert instead of using the old array of size -1 trick. Modified: cfe/trunk/include/clang/Basic/AllDiagnostics.h Modified:

r305440 - [ODRHash] Hash TemplateArgument::Pack and TemplateTypeParmType

2017-06-14 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Wed Jun 14 20:35:06 2017 New Revision: 305440 URL: http://llvm.org/viewvc/llvm-project?rev=305440=rev Log: [ODRHash] Hash TemplateArgument::Pack and TemplateTypeParmType Modified: cfe/trunk/lib/AST/ODRHash.cpp cfe/trunk/test/Modules/odr_hash.cpp Modified:

r305437 - [clang-format] Allow git-clang-format to handle empty extensions.

2017-06-14 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Wed Jun 14 19:54:08 2017 New Revision: 305437 URL: http://llvm.org/viewvc/llvm-project?rev=305437=rev Log: [clang-format] Allow git-clang-format to handle empty extensions. Most of libc++'s header files don't use extension. This prevents using git-clang-format on them, which

r305435 - Fix LexerTest signed/unsigned comparison.

2017-06-14 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Wed Jun 14 19:28:13 2017 New Revision: 305435 URL: http://llvm.org/viewvc/llvm-project?rev=305435=rev Log: Fix LexerTest signed/unsigned comparison. Werror was catching a signed/unsigned compare in an assert, correct the signed 'expected' value to be unsigned.

[clang-tools-extra] r305434 - Update Append Argument to more efficiently traverse tokens

2017-06-14 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Wed Jun 14 19:27:23 2017 New Revision: 305434 URL: http://llvm.org/viewvc/llvm-project?rev=305434=rev Log: Update Append Argument to more efficiently traverse tokens This function was previously making (correct) assumptions without complete knowledge of MacroArgs

[PATCH] D34179: [Frontend] PR32318 Handle -ast-dump-all properly.

2017-06-14 Thread don hinton via Phabricator via cfe-commits
hintonda added a comment. I have, but just haven't heard back yet... Thanks again... https://reviews.llvm.org/D34179 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34179: [Frontend] PR32318 Handle -ast-dump-all properly.

2017-06-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Committed in r305432. You should consider reaching out to Chris Lattner for svn access! https://reviews.llvm.org/D34179 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r305432 - Handle -ast-dump-all when passed as the only option.

2017-06-14 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Wed Jun 14 19:00:08 2017 New Revision: 305432 URL: http://llvm.org/viewvc/llvm-project?rev=305432=rev Log: Handle -ast-dump-all when passed as the only option. Patch by Don Hinton Modified: cfe/trunk/lib/Frontend/ASTConsumers.cpp

[PATCH] D34179: [Frontend] PR32318 Handle -ast-dump-all properly.

2017-06-14 Thread don hinton via Phabricator via cfe-commits
hintonda added a comment. Great, thanks Aaron. Could you commit it for me when you get a chance? https://reviews.llvm.org/D34179 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34225: [clang-format] Teach clang-format how to handle C++ coroutines

2017-06-14 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. Herald added a subscriber: klimek. This patch (1) enable parsing for coroutines by default and (2) teaches clang-format how to properly handle them. https://reviews.llvm.org/D34225 Files: lib/Format/Format.cpp lib/Format/TokenAnnotator.cpp

[PATCH] D34179: [Frontend] PR32318 Handle -ast-dump-all properly.

2017-06-14 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. LGTM! https://reviews.llvm.org/D34179 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D33904: Add a __has_attribute_enhancement macro to clang

2017-06-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D33904#778165, @george.burgess.iv wrote: > > Why not just use __has_feature(overloadable_unmarked) or similar? > > My impression was that `__has_feature` was was for larger features than > tweaks to attributes. If this would be an

[PATCH] D34091: Support for querying the exception specification type through libclang

2017-06-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang-c/Index.h:185 + */ + CXCursor_ExceptionSpecificationKind_None, ///< no exception specification + You can drop the trailing comment. Comment at: include/clang-c/Index.h:208 +

[PATCH] D34224: [NFC] remove trailing WS

2017-06-14 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya created this revision. https://reviews.llvm.org/D34224 Files: include/memory Index: include/memory === --- include/memory +++ include/memory @@ -724,7 +724,7 @@ struct __has_element_type : false_type {}; template

[PATCH] D33722: [clang-tidy] Add checker for undelegated copy of base classes

2017-06-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/misc/UndelegatedCopyOfBaseClassesCheck.cpp:41 + forEachConstructorInitializer( + cxxCtorInitializer(

[PATCH] D34156: [LTO] Add -femit-summary-index flag to emit summary for regular LTO

2017-06-14 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. OK! Thanks both :) https://reviews.llvm.org/D34156 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30268: Avoid copy of __atoms when char_type is char

2017-06-14 Thread Aditya Kumar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305427: [locale] Avoid copy of __atoms when char_type is char (authored by hiraditya). Changed prior to commit: https://reviews.llvm.org/D30268?vs=102566=102621#toc Repository: rL LLVM

[libcxx] r305427 - [locale] Avoid copy of __atoms when char_type is char

2017-06-14 Thread Aditya Kumar via cfe-commits
Author: hiraditya Date: Wed Jun 14 18:17:45 2017 New Revision: 305427 URL: http://llvm.org/viewvc/llvm-project?rev=305427=rev Log: [locale] Avoid copy of __atoms when char_type is char The function num_get<_CharT>::stage2_int_prep makes unnecessary copy of src into atoms when char_type is char.

[clang-tools-extra] r305426 - Update callbacks tracker to match change in 305425

2017-06-14 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Wed Jun 14 18:15:51 2017 New Revision: 305426 URL: http://llvm.org/viewvc/llvm-project?rev=305426=rev Log: Update callbacks tracker to match change in 305425 Modified: clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.cpp Modified:

[PATCH] D32046: [Preprocessor]Correct Macro-Arg allocation of StringifiedArguments, correct getNumArguments

2017-06-14 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. erichkeane marked 3 inline comments as done. Closed by commit rL305425: [Preprocessor]Correct Macro-Arg allocation of StringifiedArguments, (authored by erichkeane). Changed prior to commit:

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

2017-06-14 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added inline comments. Comment at: lib/StaticAnalyzer/Core/SValBuilder.cpp:356 QualType ResultTy) { - if (!State->isTainted(RHS) && !State->isTainted(LHS)) -return UnknownVal(); I am concerned that removing the

r305425 - [Preprocessor]Correct Macro-Arg allocation of StringifiedArguments,

2017-06-14 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Wed Jun 14 18:09:01 2017 New Revision: 305425 URL: http://llvm.org/viewvc/llvm-project?rev=305425=rev Log: [Preprocessor]Correct Macro-Arg allocation of StringifiedArguments, correct getNumArguments StringifiedArguments is allocated (resized) based on the size the

[PATCH] D33841: [clang-tidy] redundant keyword check

2017-06-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/readability/RedundantKeywordCheck.cpp:22 +template +static bool startsWith(const T , StringRef Value) { + Token Result; Why do you need to do a textual search that the first token in the declaration

[PATCH] D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler

2017-06-14 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Should this revision be "abandoned" or is the plan to iterate on it? Repository: rL LLVM https://reviews.llvm.org/D31320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31029: [analyzer] Fix logical not for pointers with different bit width

2017-06-14 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. Looks good with a nit! Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:325 + Loc makeNull() { return

[PATCH] D33645: [analyzer] Add missing documentation for static analyzer checkers

2017-06-14 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Great cleanup! Some comments below. Comment at: www/analyzer/alpha_checks.html:91 +(C, C++) +Check for logical errors for function calls and Objective-C message +expressions (e.g., uninitialized arguments, null function pointers,

LLVM buildmaster will be updated and restarted tonight

2017-06-14 Thread Galina Kistanova via cfe-commits
Hello everyone, LLVM buildmaster will be updated and restarted after 7 PM Pacific time today. Thanks Galina ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34156: [LTO] Add -femit-summary-index flag to emit summary for regular LTO

2017-06-14 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. In https://reviews.llvm.org/D34156#780714, @mehdi_amini wrote: > In https://reviews.llvm.org/D34156#780570, @tobiasvk wrote: > > > - Change patch to always emit a module summary for regular LTO > > > > I don't see any real downside of having a summary given the marginal

[PATCH] D34156: [LTO] Add -femit-summary-index flag to emit summary for regular LTO

2017-06-14 Thread Tobias Edler von Koch via Phabricator via cfe-commits
tobiasvk added a comment. In https://reviews.llvm.org/D34156#780714, @mehdi_amini wrote: > In https://reviews.llvm.org/D34156#780570, @tobiasvk wrote: > > > - Change patch to always emit a module summary for regular LTO > > > > I don't see any real downside of having a summary given the

[PATCH] D34175: [driver][macOS] Pick the system version for the deployment target if the SDK is newer than the system

2017-06-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 102607. arphaman added a comment. Remove redundant driver version correctness checks. Repository: rL LLVM https://reviews.llvm.org/D34175 Files: lib/Driver/ToolChains/Darwin.cpp test/Driver/darwin-sdkroot.c Index: test/Driver/darwin-sdkroot.c

[PATCH] D34156: [LTO] Add -femit-summary-index flag to emit summary for regular LTO

2017-06-14 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. In https://reviews.llvm.org/D34156#780570, @tobiasvk wrote: > - Change patch to always emit a module summary for regular LTO > > I don't see any real downside of having a summary given the marginal time > and space overhead it takes to construct and save it. I

r305418 - AST: Add missing break at end of switch

2017-06-14 Thread Duncan P. N. Exon Smith via cfe-commits
Author: dexonsmith Date: Wed Jun 14 16:26:31 2017 New Revision: 305418 URL: http://llvm.org/viewvc/llvm-project?rev=305418=rev Log: AST: Add missing break at end of switch Modified: cfe/trunk/lib/AST/ASTContext.cpp Modified: cfe/trunk/lib/AST/ASTContext.cpp URL:

[libcxx] r305417 - Rework some metaprogramming to use the detection idiom; no functional change

2017-06-14 Thread Marshall Clow via cfe-commits
Author: marshall Date: Wed Jun 14 16:23:57 2017 New Revision: 305417 URL: http://llvm.org/viewvc/llvm-project?rev=305417=rev Log: Rework some metaprogramming to use the detection idiom; no functional change Modified: libcxx/trunk/include/memory Modified: libcxx/trunk/include/memory URL:

[PATCH] D34158: to support gcc 4.8 (and newer) compatibility on Linux, preinclude

2017-06-14 Thread Melanie Blower via Phabricator via cfe-commits
mibintc updated this revision to Diff 102605. mibintc added a comment. Thanks for your review, Fedor. I moved AddGnuIncludeArgs out of GCCInstallation, like you suggested, and put it along where the library includes are added. I also pulled out the change for MipsLinux since I don't have a

[PATCH] D32046: [Preprocessor]Correct Macro-Arg allocation of StringifiedArguments, correct getNumArguments

2017-06-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. LGTM! Please fix the code style issues that I pointed out before committing. Comment at: unittests/Lex/LexerTest.cpp:24 #include "clang/Lex/PreprocessorOptions.h"

[PATCH] D34121: [ubsan] Teach the pointer overflow check that "p - <= p" (PR33430)

2017-06-14 Thread Vedant Kumar via Phabricator via cfe-commits
vsk updated this revision to Diff 102603. vsk marked an inline comment as done. vsk added a comment. Address Adrian's comment about using an enum to simplify some calls. https://reviews.llvm.org/D34121 Files: lib/CodeGen/CGExpr.cpp lib/CodeGen/CGExprScalar.cpp

[PATCH] D34175: [driver][macOS] Pick the system version for the deployment target if the SDK is newer than the system

2017-06-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Driver/ToolChains/Darwin.cpp:1133 + HadExtra) || + HadExtra || Major != 10 || Minor >= 100 || Micro >= 100) +return MacOSSDKVersion; inouehrs wrote: > What these magic

[PATCH] D34185: [Parser][ObjC] Avoid crashing when skipping to EOF while parsing an ObjC interface/implementation

2017-06-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D34185#780494, @ahatanak wrote: > This patch fixes the crash and that is fine, but the users might find the > last error ("expected '}'" at the end of the file) confusing. This seems to > happen because Parser::ParseLexedObjCMethodDefs

[PATCH] D33308: [analyzer]: Improve test handling with multiple constraint managers

2017-06-14 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. This looks good to me. Sorry of the delay here -- and thanks for your patience. I will review the other patches this weekend. https://reviews.llvm.org/D33308

[PATCH] D33102: [clang] Implement -Wcast-qual for C++

2017-06-14 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. As of r305410, libc++ passes all the tests w/ -Wcast-qual enabled. Repository: rL LLVM https://reviews.llvm.org/D33102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[libcxx] r305410 - Add some const_casts in places where we were implicitly casting away constness. No functional change, but now they're explicit

2017-06-14 Thread Marshall Clow via cfe-commits
Author: marshall Date: Wed Jun 14 15:00:36 2017 New Revision: 305410 URL: http://llvm.org/viewvc/llvm-project?rev=305410=rev Log: Add some const_casts in places where we were implicitly casting away constness. No functional change, but now they're explicit Modified:

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

2017-06-14 Thread David Blaikie via cfe-commits
On Wed, Jun 14, 2017, 8:17 AM Serge Pavlov wrote: > 2017-06-14 4:24 GMT+07:00 David Blaikie : > >> Ah, I find that the test passes if I remove the compile_commands.json >> file from my build directory (I have Ninja configured to generate a >>

[PATCH] D34156: [LTO] Add -femit-summary-index flag to emit summary for regular LTO

2017-06-14 Thread Tobias Edler von Koch via Phabricator via cfe-commits
tobiasvk updated this revision to Diff 102585. tobiasvk added a comment. - Change patch to always emit a module summary for regular LTO I don't see any real downside of having a summary given the marginal time and space overhead it takes to construct and save it.

[PATCH] D34210: Add __has_feature(leak_sanitizer)

2017-06-14 Thread Francis Ricci via Phabricator via cfe-commits
fjricci abandoned this revision. fjricci added a comment. Weak hooks do provide a good solution, abandoning for now (although it may need to be reconsidered if we get a windows LSan port up and running). https://reviews.llvm.org/D34210 ___

[PATCH] D33383: [GSoC] Flag value completion for clang

2017-06-14 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added a comment. Overall looking good. Good work! A few minor comments. Comment at: clang/include/clang/Driver/Options.td:2198 def stdlib_EQ : Joined<["-", "--"], "stdlib=">, Flags<[CC1Option]>, - HelpText<"C++ standard library to use">; + HelpText<"C++ standard

[PATCH] D27753: [analyzer] alpha.security.DirtyScalar Checker

2017-06-14 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. This generally sounds good. Definitely do submit these changes in small pieces! See http://llvm.org/docs/DeveloperPolicy.html#incremental-development for rationale. https://reviews.llvm.org/D27753 ___ cfe-commits

[PATCH] D34102: [analyzer] Add portability package for the checkers.

2017-06-14 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added inline comments. Comment at: include/clang/StaticAnalyzer/Checkers/Checkers.td:454 +def UnixAPIPortabilityChecker : Checker<"API">, + HelpText<"Finds implementation-defined behavior in UNIX/Posix functions">, + DescFile<"UnixAPIChecker.cpp">;

[PATCH] D34210: Add __has_feature(leak_sanitizer)

2017-06-14 Thread Maxim Ostapenko via Phabricator via cfe-commits
m.ostapenko added a comment. In https://reviews.llvm.org/D34210#780520, @fjricci wrote: > Currently, the way that we tell users to gate on sanitizer-specific behavior > is with `__has_feature(foo_sanitizer)`, as far as I know, it's the only way > to do so. LSan provides several API functions

[PATCH] D34210: Add __has_feature(leak_sanitizer)

2017-06-14 Thread Francis Ricci via Phabricator via cfe-commits
fjricci added a comment. Currently, the way that we tell users to gate on sanitizer-specific behavior is with `__has_feature(foo_sanitizer)`, as far as I know, it's the only way to do so. LSan provides several API functions for users, ie `__lsan_ignore_object`. If a user program wants to use

[PATCH] D34185: [Parser][ObjC] Avoid crashing when skipping to EOF while parsing an ObjC interface/implementation

2017-06-14 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. This patch fixes the crash and that is fine, but the users might find the last error ("expected '}'" at the end of the file) confusing. This seems to happen because Parser::ParseLexedObjCMethodDefs consumes all tokens in the file until it sees the EOF after consuming

[PATCH] D33304: [clang-tidy][Part1] Add a new module Android and three new checks.

2017-06-14 Thread Yan Wang via Phabricator via cfe-commits
yawanng updated this revision to Diff 102577. yawanng marked 7 inline comments as done. https://reviews.llvm.org/D33304 Files: clang-tidy/CMakeLists.txt clang-tidy/android/AndroidTidyModule.cpp clang-tidy/android/CMakeLists.txt clang-tidy/android/FileOpenFlagCheck.cpp

[PATCH] D33304: [clang-tidy][Part1] Add a new module Android and three new checks.

2017-06-14 Thread Yan Wang via Phabricator via cfe-commits
yawanng added inline comments. Comment at: clang-tidy/android/FileOpenFlagCheck.cpp:61 + SourceLocation EndLoc = + Lexer::getLocForEndOfToken(FlagArg->getLocEnd(), 0, SM, getLangOpts()); + hokein wrote: > Instead of using getLangOpts(), you should use

[PATCH] D34210: Add __has_feature(leak_sanitizer)

2017-06-14 Thread Kostya Serebryany via Phabricator via cfe-commits
kcc added a comment. I'm not sure about this one. standalone lsan is a link-time feature only, it doesn't change the compilation, so the argument of consistency doesn't apply. https://reviews.llvm.org/D34210 ___ cfe-commits mailing list

[PATCH] D34212: docs: Document binary compatibility issue due to bug in gcc

2017-06-14 Thread Tom Stellard via Phabricator via cfe-commits
tstellar created this revision. Reported in PR33161. https://reviews.llvm.org/D34212 Files: docs/BinaryCompatibilityWithOtherCompilers.rst Index: docs/BinaryCompatibilityWithOtherCompilers.rst === --- /dev/null +++

r305401 - [PPC] Enhance altivec conversion function macros implementation.

2017-06-14 Thread Tony Jiang via cfe-commits
Author: jtony Date: Wed Jun 14 12:23:43 2017 New Revision: 305401 URL: http://llvm.org/viewvc/llvm-project?rev=305401=rev Log: [PPC] Enhance altivec conversion function macros implementation. Add checking for the second parameter of altivec conversion builtin to make sure it is compile-time

[PATCH] D34206: [clang-tidy] Add "MakeSmartPtrFunction" option to modernize-make-shared/unique checks.

2017-06-14 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It'll be good idea to run modernize-make-unique on LLVM/Clang/etc for llvm::make_unique. https://reviews.llvm.org/D34206 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2017-06-14 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added inline comments. Comment at: lib/Sema/SemaCodeComplete.cpp:2453 std::string PlaceholderStr = FormatFunctionParameter(Policy, Param); +if (Param->hasDefaultArg() && PlaceholderStr.find("=") == std::string::npos) { +std::string DefaultValue =

[PATCH] D30268: Avoid copy of __atoms when char_type is char

2017-06-14 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya updated this revision to Diff 102566. hiraditya added a comment. Addressed comments from Eric. https://reviews.llvm.org/D30268 Files: libcxx/benchmarks/stringstream.bench.cpp libcxx/include/__config libcxx/include/locale Index: libcxx/include/locale

[PATCH] D34105: Define _GNU_SOURCE for rtems c++

2017-06-14 Thread James Y Knight via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305399: Define _GNU_SOURCE for rtems c++ (authored by jyknight). Changed prior to commit: https://reviews.llvm.org/D34105?vs=102188=102565#toc Repository: rL LLVM https://reviews.llvm.org/D34105

r305399 - Define _GNU_SOURCE for rtems c++

2017-06-14 Thread James Y Knight via cfe-commits
Author: jyknight Date: Wed Jun 14 12:01:18 2017 New Revision: 305399 URL: http://llvm.org/viewvc/llvm-project?rev=305399=rev Log: Define _GNU_SOURCE for rtems c++ This is required by the libc++ locale support. Patch by Walter Lee. Differential Revision: https://reviews.llvm.org/D34105

[libcxx] r305397 - In several places in std::allocator (and one in shared_ptr, we were casting a 'const T*' to a 'void *' - implicitly casting away the const. Add const_cast to make that expl

2017-06-14 Thread Marshall Clow via cfe-commits
Author: marshall Date: Wed Jun 14 11:54:43 2017 New Revision: 305397 URL: http://llvm.org/viewvc/llvm-project?rev=305397=rev Log: In several places in std::allocator (and one in shared_ptr, we were casting a 'const T*' to a 'void *' - implicitly casting away the const. Add const_cast to make

[libcxx] r305394 - PR32476: __nop_locale_mgmt.h not needed with newlib 2.5+

2017-06-14 Thread James Y Knight via cfe-commits
Author: jyknight Date: Wed Jun 14 11:40:03 2017 New Revision: 305394 URL: http://llvm.org/viewvc/llvm-project?rev=305394=rev Log: PR32476: __nop_locale_mgmt.h not needed with newlib 2.5+ Newlib 2.5 added the locale management functions, so it should not include __nop_local_mgmt.h. This change

[PATCH] D32146: PR32476: __nop_locale_mgmt.h not needed with newlib 2.5+

2017-06-14 Thread James Y Knight via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305394: PR32476: __nop_locale_mgmt.h not needed with newlib 2.5+ (authored by jyknight). Changed prior to commit: https://reviews.llvm.org/D32146?vs=102265=102562#toc Repository: rL LLVM

[PATCH] D34202: [clang-tidy] readability-function-size: fix nesting level calculation

2017-06-14 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. LGTM! Comment at: clang-tidy/readability/FunctionSizeCheck.cpp:58 +// is already nested NestingThreshold levels deep, record the start location +// of this new compound statement +if (CurrentNestingLevel == Info.NestingThreshold)

[PATCH] D34202: [clang-tidy] readability-function-size: fix nesting level calculation

2017-06-14 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D34202#780424, @malcolm.parsons wrote: > My coding standards require the `{}`, so while I may not agree with your > definition of nesting, it doesn't matter. Well, seeing `readability-deep-nesting.cpp` in the issue, i suppose the

[PATCH] D34202: [clang-tidy] readability-function-size: fix nesting level calculation

2017-06-14 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. My coding standards require the `{}`, so while I may not agree with your definition of nesting, it doesn't matter. Repository: rL LLVM https://reviews.llvm.org/D34202 ___ cfe-commits mailing list

[PATCH] D34202: [clang-tidy] readability-function-size: fix nesting level calculation

2017-06-14 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D34202#780394, @malcolm.parsons wrote: > What do you expect for this? > > if (true) > if (true) > if (true) { > int j; > } > that it is equivalent to if (true && true && true) { // 1 int j;

[PATCH] D34211: Implement the non-execution policy versions of `inclusive_scan` and `transform_ inclusive_scan` for C++17

2017-06-14 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. This is the last of three patches - https://reviews.llvm.org/D33997 and https://reviews.llvm.org/D34038 were the first two. When this lands, we'll have all of the new (non-parallel) algorithms that were added in C++17. https://reviews.llvm.org/D34211 Files:

[PATCH] D34198: Fix __has_trivial_destructor crash when the type is incomplete with unknown array bounds.

2017-06-14 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Test cases? https://reviews.llvm.org/D34198 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34202: [clang-tidy] readability-function-size: fix nesting level calculation

2017-06-14 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. What do you expect for this? if (true) if (true) if (true) { int j; } Repository: rL LLVM https://reviews.llvm.org/D34202 ___ cfe-commits mailing list

[PATCH] D34210: Add __has_feature(leak_sanitizer)

2017-06-14 Thread Francis Ricci via Phabricator via cfe-commits
fjricci created this revision. Stand-alone leak sanitizer builds are supported with -fsanitize=leak, adds an attribute for consistency with the rest of the sanitizer attributes. https://reviews.llvm.org/D34210 Files: lib/Lex/PPMacroExpansion.cpp test/Lexer/has_feature_leak_sanitizer.cpp

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

2017-06-14 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: lib/Sema/SemaCodeComplete.cpp:2453 std::string PlaceholderStr = FormatFunctionParameter(Policy, Param); +if (Param->hasDefaultArg() && PlaceholderStr.find("=") == std::string::npos) { +std::string DefaultValue =

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2017-06-14 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin accepted this revision. a.sidorin added a comment. Hello Daniel & Gabor, Thank you very much for your work. This patch looks good to me but I think such a change should also be approved by maintainers. https://reviews.llvm.org/D30691 ___

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2017-06-14 Thread Daniel Krupp via Phabricator via cfe-commits
dkrupp added a comment. Thanks for the reviews so far. I think we have addressed all major concerns regarding this patch: -(Anna) Scan-build-py integration of the functionality is nearly finished (see https://github.com/rizsotto/scan-build/issues/83) (--ctu switch performs both analysis phases

[PATCH] D34055: Be more strict when checking the -flto option value

2017-06-14 Thread Yuka Takahashi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305392: Be more strict when checking the -flto option value (authored by yamaguchi). Changed prior to commit: https://reviews.llvm.org/D34055?vs=102551=102555#toc Repository: rL LLVM

r305392 - Be more strict when checking the -flto option value

2017-06-14 Thread Yuka Takahashi via cfe-commits
Author: yamaguchi Date: Wed Jun 14 10:37:11 2017 New Revision: 305392 URL: http://llvm.org/viewvc/llvm-project?rev=305392=rev Log: Be more strict when checking the -flto option value Summary: It seems -flto must be either "thin" or "full". I think the use of containValue is just a typo.

[PATCH] D34121: [ubsan] Teach the pointer overflow check that "p - <= p" (PR33430)

2017-06-14 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:3010 +return CGF.EmitCheckedInBoundsGEP(ptr, indices, signedIndices, + /*IsSubtraction=*/false, loc, name); } else { Might want to define an `enum {

[PATCH] D34206: [clang-tidy] Add "MakeSmartPtrFunction" option to modernize-make-shared/unique checks.

2017-06-14 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. Herald added a subscriber: xazax.hun. https://reviews.llvm.org/D34206 Files: clang-tidy/modernize/MakeSmartPtrCheck.cpp clang-tidy/modernize/MakeSmartPtrCheck.h docs/clang-tidy/checks/modernize-make-shared.rst docs/clang-tidy/checks/modernize-make-unique.rst

[PATCH] D33304: [clang-tidy][Part1] Add a new module Android and three new checks.

2017-06-14 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tidy/android/FileOpenFlagCheck.cpp:28 + hasParameter(1, hasType(isInteger())), + hasAnyName("open", "open64")) + .bind("funcDecl")))

[PATCH] D34055: Be more strict when checking the -flto option value

2017-06-14 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson accepted this revision. tejohnson added a comment. This revision is now accepted and ready to land. LGTM, thanks for the fix! https://reviews.llvm.org/D34055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D32146: PR32476: __nop_locale_mgmt.h not needed with newlib 2.5+

2017-06-14 Thread Walter Lee via Phabricator via cfe-commits
waltl added a comment. In https://reviews.llvm.org/D32146#780231, @bcraig wrote: > LGTM. > @waltl : Do you need me to submit the changes, or will you handle that? Thanks -- I think jyknight will handle it. https://reviews.llvm.org/D32146 ___

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

2017-06-14 Thread Serge Pavlov via cfe-commits
2017-06-14 4:24 GMT+07:00 David Blaikie : > Ah, I find that the test passes if I remove the compile_commands.json file > from my build directory (I have Ninja configured to generate a > compile_commands.json file). > > Looks like what happens is it finds the compilation

[PATCH] D34055: Be more strict when checking the -flto option value

2017-06-14 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 102551. yamaguchi added a comment. Herald added a subscriber: eraman. Update patch. Add testcase and check if argument is valid or not. https://reviews.llvm.org/D34055 Files: clang/lib/Frontend/CompilerInvocation.cpp

[PATCH] D34202: [clang-tidy] readability-function-size: fix nesting level calculation

2017-06-14 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 102548. lebedev.ri added a comment. Simplify it even further by moving the logic into it's proper place - `TraverseCompoundStmt()` Repository: rL LLVM https://reviews.llvm.org/D34202 Files: clang-tidy/readability/FunctionSizeCheck.cpp

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

2017-06-14 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added inline comments. Comment at: lib/Sema/SemaCodeComplete.cpp:2411-2417 + const SourceLocation StartLoc = SrcRange.getBegin(); + const SourceLocation EndLoc = SrcRange.getEnd(); + if (StartLoc != SM.getExpansionLoc(StartLoc) || EndLoc != SM.getExpansionLoc(EndLoc))

[PATCH] D33719: Add _Float16 as a C/C++ source language type

2017-06-14 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer updated this revision to Diff 102543. SjoerdMeijer added a comment. Float16 is added as a native type. Implementing it as some sort of alias to fp16 caused too many type issues in expression/literals/etc., and thus was not an easier first step, and also in the end we want it to be

  1   2   >