[PATCH] D42672: [CFG] [analyzer] Heavier CFGConstructor elements.

2018-01-31 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. I think it will be great to have a more explicit representation of construction in the CFG! Comments in line. Comment at: include/clang/Analysis/CFG.h:143 + CXXConstructExpr *Constructor; + Stmt *Trigger; + I think it would be

[PATCH] D42641: [MinGW] Emit typeinfo locally for dllimported classes without key functions

2018-01-31 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: lib/CodeGen/ItaniumCXXABI.cpp:2766 +// Don't import the RTTI but emit it locally +if (CGM.getTriple().isWindowsGNUEnvironment() && IsDLLImport) + return false; mstorsjo wrote: > compnerd wrote: > > Can't

[PATCH] D42768: AST: add an extension to support SwiftCC on MS ABI

2018-01-31 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. No, I mean things like `void foo(__attribute__((swiftcall)) void (*fnptr)());`. Repository: rC Clang https://reviews.llvm.org/D42768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D42768: AST: add an extension to support SwiftCC on MS ABI

2018-01-31 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 132328. compnerd added a comment. Add test case for non-anonymous non-__Swift::__swift_cc namespace. Repository: rC Clang https://reviews.llvm.org/D42768 Files: lib/AST/MicrosoftMangle.cpp test/CodeGenCXX/msabi-swiftcall-cc.cpp Index:

[PATCH] D42768: AST: add an extension to support SwiftCC on MS ABI

2018-01-31 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 132325. compnerd added a comment. Handle namespaces properly Repository: rC Clang https://reviews.llvm.org/D42768 Files: lib/AST/MicrosoftMangle.cpp test/CodeGenCXX/msabi-swiftcall-cc.cpp Index: test/CodeGenCXX/msabi-swiftcall-cc.cpp

[PATCH] D42768: AST: add an extension to support SwiftCC on MS ABI

2018-01-31 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. Ah, yeah, I'm just filling in the test cases for those two cases. Repository: rC Clang https://reviews.llvm.org/D42768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D42768: AST: add an extension to support SwiftCC on MS ABI

2018-01-31 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. Some cases that drop the additional namespacing entirely, which is I think what @rjmccall was pointing out: // mangles to ?f@n@@YAXXZ namespace n { void __attribute__((__swiftcall__)) f(void) {} }; // mangles to ?f@s@@QEAAXXZ struct

[PATCH] D42768: AST: add an extension to support SwiftCC on MS ABI

2018-01-31 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. @rjmccall I think both of those are concerns. I'm just putting this up so that others can grab and test it. It also coincides with the approach that we have taken elsewhere in clang using the `__clang` namespace for extending the decoration. What is the case that I

[PATCH] D42768: AST: add an extension to support SwiftCC on MS ABI

2018-01-31 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 132324. compnerd added a comment. Handle pointers as well Repository: rC Clang https://reviews.llvm.org/D42768 Files: lib/AST/MicrosoftMangle.cpp test/CodeGenCXX/msabi-swiftcall-cc.cpp Index: test/CodeGenCXX/msabi-swiftcall-cc.cpp

[PATCH] D42768: AST: add an extension to support SwiftCC on MS ABI

2018-01-31 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Is demangling "correctly" really a more important goal here than not spuriously failing when presented with a swiftcall function type in a non-top-level position? I don't know that there was anything wrong with the previous patch's approach to this if we're just

[PATCH] D42035: [clang-format] Fixup #include guard indents after parseFile()

2018-01-31 Thread Mark Zeren via Phabricator via cfe-commits
mzeren-vmw updated this revision to Diff 132320. mzeren-vmw added a comment. rebase, ping. Repository: rC Clang https://reviews.llvm.org/D42035 Files: lib/Format/UnwrappedLineParser.cpp lib/Format/UnwrappedLineParser.h unittests/Format/FormatTest.cpp Index:

[libcxx] r323945 - Add static_asserts to basic_ios and basic_stream_buf to ensure that that the traits match the character type. This is a requirement on the user - now we get consistent failures at c

2018-01-31 Thread Marshall Clow via cfe-commits
Author: marshall Date: Wed Jan 31 19:55:27 2018 New Revision: 323945 URL: http://llvm.org/viewvc/llvm-project?rev=323945=rev Log: Add static_asserts to basic_ios and basic_stream_buf to ensure that that the traits match the character type. This is a requirement on the user - now we get

[PATCH] D42779: [analyzer] NFC: Make sure we don't ever inline the constructor for which the temporary destructor is noreturn and missing.

2018-01-31 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 132316. NoQ added a comment. Add a comment explaining that it's not really bad to inline the constructor, but we simply have the sink not implemented in this case. https://reviews.llvm.org/D42779 Files: lib/StaticAnalyzer/Core/ExprEngineCXX.cpp Index:

[PATCH] D42768: AST: add an extension to support SwiftCC on MS ABI

2018-01-31 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 132315. compnerd added a comment. Use reserved namespace. Repository: rC Clang https://reviews.llvm.org/D42768 Files: lib/AST/MicrosoftMangle.cpp test/CodeGenCXX/msabi-swiftcall-cc.cpp Index: test/CodeGenCXX/msabi-swiftcall-cc.cpp

[PATCH] D42779: [analyzer] NFC: Make sure we don't ever inline the constructor for which the temporary destructor is noreturn and missing.

2018-01-31 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added a reviewer: dcoughlin. Herald added subscribers: cfe-commits, a.sidorin, szepet, xazax.hun. Herald added a reviewer: george.karpenkov. Because we're planning to add more cases when temporary constructors will be inlined, it is important to document the fact

[PATCH] D42641: [MinGW] Emit typeinfo locally for dllimported classes without key functions

2018-01-31 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: lib/CodeGen/ItaniumCXXABI.cpp:2766 +// Don't import the RTTI but emit it locally +if (CGM.getTriple().isWindowsGNUEnvironment() && IsDLLImport) + return false; compnerd wrote: > Can't this be simplified to

[PATCH] D42758: Support `#pragma comment(lib, "name")` in the frontend for ELF

2018-01-31 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. In https://reviews.llvm.org/D42758#993936, @ruiu wrote: > > I also wonder which is better `#pragma comment(lib, "m")` or `#pragma > > comment(lib, "m")`. > > Sorry, I meant `#pragma comment(lib, "m")` or `#pragma comment("lib", "m")`. I can't swear to it but I don't

[PATCH] D42641: [MinGW] Emit typeinfo locally for dllimported classes without key functions

2018-01-31 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. I think that the new version is better. Comment at: lib/CodeGen/ItaniumCXXABI.cpp:2766 +// Don't import the RTTI but emit it locally +if (CGM.getTriple().isWindowsGNUEnvironment() && IsDLLImport) + return false; Can't

r323943 - [CodeGen] Fix an assertion failure in CGRecordLowering.

2018-01-31 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Jan 31 19:04:15 2018 New Revision: 323943 URL: http://llvm.org/viewvc/llvm-project?rev=323943=rev Log: [CodeGen] Fix an assertion failure in CGRecordLowering. This patch fixes a bug in CGRecordLowering::accumulateBitFields where it unconditionally starts a new run and

[libclc] r323942 - half_powr: Implement using powr

2018-01-31 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Wed Jan 31 19:00:35 2018 New Revision: 323942 URL: http://llvm.org/viewvc/llvm-project?rev=323942=rev Log: half_powr: Implement using powr v2: Use full precision implementation Reviewer: Jeroen Ketema Signed-off-by: Jan Vesely

[PATCH] D42718: [analyzer] [tests] Show the number of removed/added bug reports

2018-01-31 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC323941: [analyzer] [tests] Show the number of removed/added bug reports (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Repository: rC Clang

r323941 - [analyzer] [tests] Show the number of removed/added bug reports

2018-01-31 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Wed Jan 31 18:38:42 2018 New Revision: 323941 URL: http://llvm.org/viewvc/llvm-project?rev=323941=rev Log: [analyzer] [tests] Show the number of removed/added bug reports Differential Revision: https://reviews.llvm.org/D42718 Modified:

[PATCH] D42776: [Sema] Fix an assertion failure in constant expression evaluation of calls to functions with default arguments

2018-01-31 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added a reviewer: rsmith. The assertion fails when a function with a default argument that materializes a temporary is called more than once in an expression. The assertion fails in CallStackFrame::createTemporary when it searches map Temporaries using

[PATCH] D42730: [clang-tidy]] Add check for use of types/classes/functions from header which are deprecated and removed in C++17

2018-01-31 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/AvoidFunctionalCheck.h:19 + +/// Check for several deprecated types and classes from header +/// aaron.ballman wrote: > alexfh wrote: > > Quuxplusone wrote: > > > aaron.ballman wrote: > > > > alexfh

[PATCH] D42457: [analyzer] Don't communicate evaluation failures through memregion hierarchy.

2018-01-31 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. However, I do think you should take George's suggestion to have makeZeroElementRegion() have a boolean out parameter rather than a EvalCallOptions out parameter.

[PATCH] D41102: Setup clang-doc frontend framework

2018-01-31 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett planned changes to this revision. juliehockett added inline comments. Comment at: tools/clang-doc/ClangDoc.cpp:60 + +comments::FullComment *ClangDocVisitor::getComment(const Decl *D) { + RawComment *Comment = Context->getRawCommentForDeclNoCache(D);

[PATCH] D41102: Setup clang-doc frontend framework

2018-01-31 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 132306. juliehockett marked 47 inline comments as done. juliehockett added a comment. 1. Changing the traversal pattern from using `RecursiveASTVisitor` to using matchers instead. This will allow for a more flexible API (e.g. allowing access to

Re: r323935 - PR36181: Teach CodeGen to properly ignore requests to emit dependent entities.

2018-01-31 Thread Richard Smith via cfe-commits
On 31 January 2018 at 16:42, Shoaib Meenai via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Is this viable for backporting to 6.0? It fixes a bug that's been hit in > various forms by quite a few people: https://bugs.llvm.org/show_ > bug.cgi?id=36181,

[PATCH] D42490: [cmake] Set cmake policy CMP0068 to suppress warnings on OSX

2018-01-31 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a comment. In https://reviews.llvm.org/D42490#994154, @beanz wrote: > Historically we've duplicated `cmake_policy` calls on a per-project basis > which we needed to support standalone builds. That said, it would be nice if > we had LLVM vend some CMake modules that encapsulated

[PATCH] D41889: [libcxxabi][demangler] Clean up and llvm-ify the type parser

2018-01-31 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith requested changes to this revision. dexonsmith added a comment. This revision now requires changes to proceed. If it's possible to separate the bugfix into a separate commit (either before or after), I think you should. Repository: rCXXA libc++abi https://reviews.llvm.org/D41889

[PATCH] D31372: Support Microsoft mangling of swift calling convention methods

2018-01-31 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. https://reviews.llvm.org/D42768 adds the __swift_cc in the right location and demangles correctly with undname as well. https://reviews.llvm.org/D31372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: r323935 - PR36181: Teach CodeGen to properly ignore requests to emit dependent entities.

2018-01-31 Thread Shoaib Meenai via cfe-commits
Is this viable for backporting to 6.0? It fixes a bug that's been hit in various forms by quite a few people: https://bugs.llvm.org/show_bug.cgi?id=36181, https://bugs.llvm.org/show_bug.cgi?id=35473, and https://bugs.llvm.org/show_bug.cgi?id=35939. From: cfe-commits

[PATCH] D41102: Setup clang-doc frontend framework

2018-01-31 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich added inline comments. Comment at: tools/clang-doc/ClangDoc.h:33 + +class ClangDocVisitor : public RecursiveASTVisitor { +public: sammccall wrote: > This API makes essentially everything public. Is that the intent? > > It seems like

r323935 - PR36181: Teach CodeGen to properly ignore requests to emit dependent entities.

2018-01-31 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Jan 31 16:28:36 2018 New Revision: 323935 URL: http://llvm.org/viewvc/llvm-project?rev=323935=rev Log: PR36181: Teach CodeGen to properly ignore requests to emit dependent entities. Previously, friend function definitions within class templates slipped through the gaps

[PATCH] D40929: Unblock Swift Calling Convention Mangling on Windows

2018-01-31 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. https://reviews.llvm.org/D42768 adds the `__swift_cc` in the right location and detangles correctly with `undname` as well. Repository: rC Clang https://reviews.llvm.org/D40929 ___ cfe-commits mailing list

[PATCH] D42768: AST: add an extension to support SwiftCC on MS ABI

2018-01-31 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added a reviewer: rnk. compnerd added a subscriber: troughton. Since we are unable to mangle the SwiftCC CC in the function type, provide an additional namespace qualifier to the decorated source of `__swift_cc` which serves as the CC identifier. This is

[PATCH] D42490: [cmake] Set cmake policy CMP0068 to suppress warnings on OSX

2018-01-31 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. This revision is now accepted and ready to land. Historically we've duplicated `cmake_policy` calls on a per-project basis which we needed to support standalone builds. That said, it would be nice if we had LLVM vend some CMake modules that

[PATCH] D42650: [clang-format] New format param ObjCBinPackProtocolList

2018-01-31 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. Thanks! @jolesiak is not available for the rest of the week, so should I just submit this as-is, or wait until next week? Repository: rC Clang https://reviews.llvm.org/D42650 ___ cfe-commits mailing list

[PATCH] D42650: [clang-format] New format param ObjCBinPackProtocolList

2018-01-31 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore accepted this revision. stephanemoore added a comment. This revision is now accepted and ready to land. Looks good to me  Thanks for driving this! Repository: rC Clang https://reviews.llvm.org/D42650 ___ cfe-commits mailing list

[PATCH] D41887: [libcxxabi][demangler] Clean up and llvm-ify the expression parser

2018-01-31 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. LGTM. Comment at: src/cxa_demangle.cpp:1992 +const char* +parse_expression(const char* first, const char* last, Db& db) +{ I think clang-format

[PATCH] D41318: Start setting dso_local in clang

2018-01-31 Thread Rafael Avila de Espindola via Phabricator via cfe-commits
espindola updated this revision to Diff 132282. espindola added a comment. Handle ppc. https://reviews.llvm.org/D41318 Files: clang/lib/CodeGen/CGDecl.cpp clang/lib/CodeGen/CGVTT.cpp clang/lib/CodeGen/CGVTables.cpp clang/lib/CodeGen/CodeGenModule.cpp clang/lib/CodeGen/CodeGenModule.h

Re: [PATCH] D41318: Start setting dso_local in clang

2018-01-31 Thread Rafael Avila de Espindola via cfe-commits
Sean Fertile via Phabricator writes: > sfertile added inline comments. > > > > Comment at: clang/lib/CodeGen/CodeGenModule.cpp:750 > + // If we can use a plt entry as the symbol address we can assume it > + // is local. > + if (isa(D) &&

[PATCH] D41698: [DebugInfo] Enable debug information for C99 VLA types

2018-01-31 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl accepted this revision. aprantl added inline comments. This revision is now accepted and ready to land. Comment at: lib/CodeGen/CGDecl.cpp:994 + cast(VlaSize.NumElts)->getName()); + auto QT = getContext().getIntTypeForBitwidth(VlaSize.NumElts->getType() +

[PATCH] D41698: [DebugInfo] Enable debug information for C99 VLA types

2018-01-31 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 132275. sdesmalen added a comment. - Now always emit an alloca for a VLA dimension expression (regardless of whether -g is passed). - Fixed up some more tests since it now also triggers for all tests with variable length arrays that don't pass -g. -

[PATCH] D42660: [PR32482] Fix bitfield layout for -mms-bitfield and pragma pack

2018-01-31 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC323921: [PR32482] Fix bitfield layout for -mms-bitfield and pragma pack (authored by arphaman, committed by ). Repository: rC Clang https://reviews.llvm.org/D42660 Files:

r323921 - [PR32482] Fix bitfield layout for -mms-bitfield and pragma pack

2018-01-31 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Wed Jan 31 13:59:02 2018 New Revision: 323921 URL: http://llvm.org/viewvc/llvm-project?rev=323921=rev Log: [PR32482] Fix bitfield layout for -mms-bitfield and pragma pack The patch ensures that a new storage unit is created when the new bitfield's size is wider than the

[PATCH] D42766: [DebugInfo] Support DWARFv5 source code embedding extension

2018-01-31 Thread Scott Linder via Phabricator via cfe-commits
scott.linder created this revision. scott.linder added reviewers: echristo, arsenm, aprantl. Herald added subscribers: cfe-commits, JDevlieghere, nhaehnle, wdng. In DWARFv5 the Line Number Program Header is extensible, allowing values with new content types. In this extension source is embedded

[PATCH] D42730: [clang-tidy]] Add check for use of types/classes/functions from header which are deprecated and removed in C++17

2018-01-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/AvoidFunctionalCheck.h:19 + +/// Check for several deprecated types and classes from header +/// alexfh wrote: > Quuxplusone wrote: > > aaron.ballman wrote: > > > alexfh wrote: > > > > alexfh

[libclc] r323920 - math.h: Use logical operations instead of bit operations for readability

2018-01-31 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Wed Jan 31 13:53:42 2018 New Revision: 323920 URL: http://llvm.org/viewvc/llvm-project?rev=323920=rev Log: math.h: Use logical operations instead of bit operations for readability Trivial. Reported-by: Roman Lebedev Signed-off-by: Jan Vesely

[clang-tools-extra] r323919 - [clang-tidy] New argument --language to add_new_check.py

2018-01-31 Thread Ben Hamilton via cfe-commits
Author: benhamilton Date: Wed Jan 31 13:52:39 2018 New Revision: 323919 URL: http://llvm.org/viewvc/llvm-project?rev=323919=rev Log: [clang-tidy] New argument --language to add_new_check.py Summary: Currently, add_new_check.py assumes all checks are for C++ code. This adds a new argument

[libcxx] r323918 - Implement LWG2870: Default value of parameter theta of polar should be dependent

2018-01-31 Thread Marshall Clow via cfe-commits
Author: marshall Date: Wed Jan 31 13:42:39 2018 New Revision: 323918 URL: http://llvm.org/viewvc/llvm-project?rev=323918=rev Log: Implement LWG2870: Default value of parameter theta of polar should be dependent Modified: libcxx/trunk/include/complex

[PATCH] D42623: [clang-tidy] Add a Lexer util to get the source text of a statement

2018-01-31 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/LexerUtils.h:26 +/// Get source code text for statement. +Optional getStmtText(const Stmt* Statement, const SourceManager& SM); +

[PATCH] D42730: [clang-tidy]] Add check for use of types/classes/functions from header which are deprecated and removed in C++17

2018-01-31 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/AvoidFunctionalCheck.h:19 + +/// Check for several deprecated types and classes from header +/// Quuxplusone wrote: > aaron.ballman wrote: > > alexfh wrote: > > > alexfh wrote: > > > > aaron.ballman

[PATCH] D42745: [analyzer] Add support for __builtin_constant_p to BuiltinFunctionChecker

2018-01-31 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Nice, thanks! Comment at: lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp:126 + SVB.getBasicValueFactory().getAPSIntType(CE->getType()).apply(Result); + V = SVB.makeIntVal(Result); +}

[PATCH] D42758: Support `#pragma comment(lib, "name")` in the frontend for ELF

2018-01-31 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added a comment. > I also wonder which is better `#pragma comment(lib, "m")` or `#pragma > comment(lib, "m")`. Sorry, I meant `#pragma comment(lib, "m")` or `#pragma comment("lib", "m")`. Repository: rC Clang https://reviews.llvm.org/D42758

[PATCH] D42758: Support `#pragma comment(lib, "name")` in the frontend for ELF

2018-01-31 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added a comment. `#pragma comment` is what Microsoft is using, but is everybody happy about that name? It isn't clear at least to me that what it actually means is linker directives. I also wonder which is better `#pragma comment(lib, "m")` or `#pragma comment(lib, "m")`. Repository:

[PATCH] D42645: New simple Checker for mmap calls

2018-01-31 Thread David CARLIER via Phabricator via cfe-commits
devnexen added a comment. In https://reviews.llvm.org/D42645#990771, @a.sidorin wrote: > Hello David, > > Do you have any results of this checker on the real code? If yes, could you > please share them? > There are also some inline comments regarding implementation. I did a quick test on the

[PATCH] D42758: Support `#pragma comment(lib, "name")` in the frontend for ELF

2018-01-31 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 132252. compnerd added a comment. Add missed file Repository: rC Clang https://reviews.llvm.org/D42758 Files: lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h lib/Parse/ParsePragma.cpp test/CodeGen/elf-linker-options.c Index:

[PATCH] D42758: Support `#pragma comment(lib, "name")` in the frontend for ELF

2018-01-31 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added a reviewer: rnk. This adds the frontend support required to support the use of the comment pragma to enable auto linking on ELFish targets. This is a generic ELF extension supported by LLVM. We need to change the handling for the "dependentlib"

[PATCH] D41885: [libcxxabi][demangler] Improve handling of variadic templates

2018-01-31 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL323906: [demangler] Improve variadic template support (authored by epilk, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[libcxxabi] r323906 - [demangler] Improve variadic template support

2018-01-31 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Wed Jan 31 12:17:06 2018 New Revision: 323906 URL: http://llvm.org/viewvc/llvm-project?rev=323906=rev Log: [demangler] Improve variadic template support This commit changes how variadic templates are represented in the demangler, in order to fix some longstanding bugs. Now

[PATCH] D42408: [clang-format] Align preprocessor comments with #

2018-01-31 Thread Mark Zeren via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL323904: [clang-format] Align preprocessor comments with # (authored by mzeren-vmw, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r323904 - [clang-format] Align preprocessor comments with #

2018-01-31 Thread Mark Zeren via cfe-commits
Author: mzeren-vmw Date: Wed Jan 31 12:05:50 2018 New Revision: 323904 URL: http://llvm.org/viewvc/llvm-project?rev=323904=rev Log: [clang-format] Align preprocessor comments with # Summary: r312125, which introduced preprocessor indentation, shipped with a known issue where "indentation of

r323902 - Clarify that optimization levels -O2 and above are recommended for use of PGO.

2018-01-31 Thread Eric Christopher via cfe-commits
Author: echristo Date: Wed Jan 31 11:52:58 2018 New Revision: 323902 URL: http://llvm.org/viewvc/llvm-project?rev=323902=rev Log: Clarify that optimization levels -O2 and above are recommended for use of PGO. Modified: cfe/trunk/docs/UsersManual.rst Modified: cfe/trunk/docs/UsersManual.rst

Re: r323890 - [AMDGPU] Add ds_fadd, ds_fmin, ds_fmax builtins functions

2018-01-31 Thread Galina Kistanova via cfe-commits
Hello Daniil, It look like this commits added broken tests to one of our builders: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/7639 . . . Failing Tests (5): Clang :: CodeGenOpenCL/builtins-amdgcn-vi.cl LLVM :: CodeGen/AArch64/machine-outliner.mir

[PATCH] D42755: [libcxx] Fix last_write_time tests for filesystems that don't support very small times.

2018-01-31 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Don't like removing `new_time = file_time_type::min() + MicroSec(1);` part of the `test_write_min_time` but it escapes `file_time_type::min()` check. If somebody can explain the purpose of this test, I'd be glad to preserve it for filesystems that support very small

[PATCH] D42755: [libcxx] Fix last_write_time tests for filesystems that don't support very small times.

2018-01-31 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: EricWF, Hahnfeld. Herald added a subscriber: jkorous-apple. rdar://problem/35865151 https://reviews.llvm.org/D42755 Files: libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp Index:

[PATCH] D42673: [RISCV] Pick the correct RISCV linker instead of calling riscv-gcc to link

2018-01-31 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In https://reviews.llvm.org/D42673#992056, @asb wrote: > My main concern with this patch is that the description doesn't really match > what it does. The current in-tree code _doesn't_ call gcc to link for the > tested configuration (a multilib toolchain), and this is

[PATCH] D42730: Add clang-tidy check for use of types/classes/functions from header which are deprecated and removed in C++17

2018-01-31 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:60 +- New `modernize-avoid-functional + `_ check Please move it to new checks section in alphabetical

[PATCH] D42736: [DebugInfo] Improvements to representation of enumeration types (PR36168)

2018-01-31 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: lib/CodeGen/CGDebugInfo.cpp:2490-2491 for (const auto *Enum : ED->enumerators()) { -Enumerators.push_back(DBuilder.createEnumerator( -Enum->getName(), Enum->getInitVal().getSExtValue())); +const auto =

r323897 - [WebAssembly] Don't pass -ffunction-section/-fdata-sections

2018-01-31 Thread Sam Clegg via cfe-commits
Author: sbc Date: Wed Jan 31 10:55:22 2018 New Revision: 323897 URL: http://llvm.org/viewvc/llvm-project?rev=323897=rev Log: [WebAssembly] Don't pass -ffunction-section/-fdata-sections llvm currently forces both of these to true to passing them is redundant. Differential Revision:

[PATCH] D37831: [WebAssembly] Don't pass -ffunction-section/-fdata-sections

2018-01-31 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC323897: [WebAssembly] Dont pass -ffunction-section/-fdata-sections (authored by sbc, committed by ). Changed prior to commit: https://reviews.llvm.org/D37831?vs=132098=132213#toc Repository: rC

[PATCH] D39571: [clangd] DidChangeConfiguration Notification

2018-01-31 Thread Simon Marchi via Phabricator via cfe-commits
simark added inline comments. Comment at: clangd/ClangdLSPServer.cpp:78 {"documentHighlightProvider", true}, +{"configurationChangeProvider", true}, {"renameProvider", true}, ilya-biryukov wrote: > simark wrote: > > Nebiroth

[PATCH] D42730: Add clang-tidy check for use of types/classes/functions from header which are deprecated and removed in C++17

2018-01-31 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: clang-tidy/modernize/AvoidFunctionalCheck.h:19 + +/// Check for several deprecated types and classes from header +/// aaron.ballman wrote: > alexfh wrote: > > alexfh wrote: > > > aaron.ballman wrote: > > > >

r323890 - [AMDGPU] Add ds_fadd, ds_fmin, ds_fmax builtins functions

2018-01-31 Thread Daniil Fukalov via cfe-commits
Author: dfukalov Date: Wed Jan 31 08:55:09 2018 New Revision: 323890 URL: http://llvm.org/viewvc/llvm-project?rev=323890=rev Log: [AMDGPU] Add ds_fadd, ds_fmin, ds_fmax builtins functions Reviewed by arsenm Differential Revision: https://reviews.llvm.org/D42578 Modified:

[PATCH] D42310: Formalize FreeBSD support of compiler rt

2018-01-31 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. What's wrong with the symlink approach? Repository: rC Clang https://reviews.llvm.org/D42310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D42666: Revert "Revert rC322769: [RISCV] Propagate -mabi and -march values to GNU assembler."

2018-01-31 Thread Ana Pazos via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC323894: Revert Revert rC322769: [RISCV] Propagate -mabi and -march values to GNU… (authored by apazos, committed by ). Repository: rL LLVM https://reviews.llvm.org/D42666 Files:

[PATCH] D42666: Revert "Revert rC322769: [RISCV] Propagate -mabi and -march values to GNU assembler."

2018-01-31 Thread Ana Pazos via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL323894: Revert Revert rC322769: [RISCV] Propagate -mabi and -march values to GNU… (authored by apazos, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r323894 - Revert "Revert rC322769: [RISCV] Propagate -mabi and -march values to GNU assembler."

2018-01-31 Thread Ana Pazos via cfe-commits
Author: apazos Date: Wed Jan 31 10:11:09 2018 New Revision: 323894 URL: http://llvm.org/viewvc/llvm-project?rev=323894=rev Log: Revert "Revert rC322769: [RISCV] Propagate -mabi and -march values to GNU assembler." Summary: Bringing back the code change and simplified test cases to test 32/64

[PATCH] D42745: [analyzer] Add support for __builtin_constant_p to BuiltinFunctionChecker

2018-01-31 Thread Felix Kostenzer via Phabricator via cfe-commits
sp4r74n-117 created this revision. sp4r74n-117 added reviewers: george.karpenkov, dcoughlin, dergachev.a. sp4r74n-117 created this object with visibility "All Users". Herald added subscribers: cfe-commits, a.sidorin, szepet, xazax.hun. Added evaluation of __builtin_constant_p to the dedicated

[PATCH] D42170: Fixit for 'typedef' instead of 'typename' typo

2018-01-31 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai accepted this revision. vsapsai added a comment. This revision is now accepted and ready to land. One small note about `-fdiagnostics-parseable-fixits`. The rest looks good to me. And the test looks readable. Comment at:

[PATCH] D41655: [clang-tidy] New check bugprone-unused-return-value

2018-01-31 Thread Kalle Huttunen via Phabricator via cfe-commits
khuttun added a comment. Herald added a subscriber: hintonda. Any more comments on this? https://reviews.llvm.org/D41655 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D16403: Add scope information to CFG

2018-01-31 Thread Maxim Ostapenko via Phabricator via cfe-commits
m.ostapenko added a comment. In https://reviews.llvm.org/D16403#992452, @NoQ wrote: > Thank you, this explanation looks very reasonable. > > All right, so right after the termination of the loop we have > > [B1] > 1: ForStmt (LoopExit) > 2: [B4.5].~A() (Implicit destructor) > 3:

[PATCH] D42644: [asan] Intercept std::rethrow_exception indirectly.

2018-01-31 Thread Kuba (Brecka) Mracek via Phabricator via cfe-commits
kubamracek added a comment. Cool. Can we get a lit test as well? Repository: rCRT Compiler Runtime https://reviews.llvm.org/D42644 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D42730: Add clang-tidy check for use of types/classes/functions from header which are deprecated and removed in C++17

2018-01-31 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/AvoidFunctionalCheck.h:19 + +/// Check for several deprecated types and classes from header +/// alexfh wrote: > aaron.ballman wrote: > > massberg wrote: > > > massberg wrote: > > > > aaron.ballman

[PATCH] D42730: Add clang-tidy check for use of types/classes/functions from header which are deprecated and removed in C++17

2018-01-31 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/AvoidFunctionalCheck.h:19 + +/// Check for several deprecated types and classes from header +/// aaron.ballman wrote: > massberg wrote: > > massberg wrote: > > > aaron.ballman wrote: > > > > Missing

[PATCH] D42684: clang-format: Allow optimizer to break template declaration.

2018-01-31 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 132198. Typz added a comment. Force wrap after multi-line template declaration Repository: rC Clang https://reviews.llvm.org/D42684 Files: include/clang/Format/Format.h lib/Format/ContinuationIndenter.cpp lib/Format/Format.cpp

[PATCH] D37831: [WebAssembly] Don't pass -ffunction-section/-fdata-sections

2018-01-31 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added a comment. In https://reviews.llvm.org/D37831#992822, @sbc100 wrote: > After a little discussion about this and the -gc-sections linker flag, the > augments for the tools having sensible defaults seem to be winning. Well sure, when you put it that way, nobody can argue against

[PATCH] D42310: Formalize FreeBSD support of compiler rt

2018-01-31 Thread John Baldwin via Phabricator via cfe-commits
bsdjhb added a comment. My only question is if we want an OS version check as the FreeBSD driver does now for libc++ vs libstdc++? FreeBSD started using libcompiler_rt for libgcc.a in 9.0. Repository: rC Clang https://reviews.llvm.org/D42310

Re: r294872 - CodeGen: annotate ObjC ARC functions with ABI constraints

2018-01-31 Thread Akira Hatanaka via cfe-commits
> On Jan 30, 2018, at 4:32 PM, Saleem Abdulrasool wrote: > > Thanks for the note here. I’ll try to take a look at that, but, yes, the > frontend change itself is correct. I’ve seen many, many places where the > ObjCARC passes break down in the backend, and I’ve filed

[PATCH] D42578: [AMDGPU] Add ds_fadd, ds_fmin, ds_fmax builtins functions

2018-01-31 Thread Daniil Fukalov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC323890: [AMDGPU] Add ds_fadd, ds_fmin, ds_fmax builtins functions (authored by dfukalov, committed by ). Repository: rL LLVM https://reviews.llvm.org/D42578 Files:

[PATCH] D42578: [AMDGPU] Add ds_fadd, ds_fmin, ds_fmax builtins functions

2018-01-31 Thread Daniil Fukalov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL323890: [AMDGPU] Add ds_fadd, ds_fmin, ds_fmax builtins functions (authored by dfukalov, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D41698: [DebugInfo] Enable debug information for C99 VLA types

2018-01-31 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl requested changes to this revision. aprantl added a comment. This revision now requires changes to proceed. The correct way to fix this is to generate the stack object unconditionally (it will get optimized away by mem2reg when optimizations are enabled) and only emit the dbg.declare

[PATCH] D42708: [clang-format] Set ObjCBinPackProtocolList to Never for google style

2018-01-31 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 132189. benhamilton added a comment. Fix comment. Repository: rC Clang https://reviews.llvm.org/D42708 Files: lib/Format/Format.cpp unittests/Format/FormatTestObjC.cpp Index: unittests/Format/FormatTestObjC.cpp

[PATCH] D37831: [WebAssembly] Don't pass -ffunction-section/-fdata-sections

2018-01-31 Thread Dan Gohman via Phabricator via cfe-commits
sunfish accepted this revision. sunfish added a comment. This revision is now accepted and ready to land. In https://reviews.llvm.org/D37831#871238, @dschuff wrote: > I think the reasoning was really just that code size reduction is even more > important on wasm than other platforms, and

[PATCH] D42708: [clang-format] Set ObjCBinPackProtocolList to Never for google style

2018-01-31 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: lib/Format/Format.cpp:765 GoogleStyle.ColumnLimit = 100; +GoogleStyle.BinPackObjCProtocolList = FormatStyle::BPS_Never; } benhamilton wrote: > jolesiak wrote: > > If I understand correctly this is meant

[PATCH] D42708: [clang-format] Set ObjCBinPackProtocolList to Never for google style

2018-01-31 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 132188. benhamilton marked an inline comment as done. benhamilton added a comment. - BinPackObjCProtocolList -> ObjCBinPackProtocolList Repository: rC Clang https://reviews.llvm.org/D42708 Files: lib/Format/Format.cpp

[PATCH] D42650: [clang-format] New format param ObjCBinPackProtocolList

2018-01-31 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 132187. benhamilton marked 2 inline comments as done. benhamilton added a comment. - BinPackObjCProtocolList -> ObjCBinPackProtocolList Repository: rC Clang https://reviews.llvm.org/D42650 Files: include/clang/Format/Format.h

[PATCH] D42708: [clang-format] Set BinPackObjCProtocolList to Never for google style

2018-01-31 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 132185. benhamilton added a comment. Move to general property section Repository: rC Clang https://reviews.llvm.org/D42708 Files: lib/Format/Format.cpp unittests/Format/FormatTestObjC.cpp Index: unittests/Format/FormatTestObjC.cpp

[PATCH] D42708: [clang-format] Set BinPackObjCProtocolList to Never for google style

2018-01-31 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton marked an inline comment as done. benhamilton added inline comments. Comment at: lib/Format/Format.cpp:765 GoogleStyle.ColumnLimit = 100; +GoogleStyle.BinPackObjCProtocolList = FormatStyle::BPS_Never; } jolesiak wrote: > If I understand

  1   2   >