[PATCH] D40819: Implement Attribute Target MultiVersioning (Improved edition!)

2017-12-14 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 127005. erichkeane added a comment. Fix error message per @aaron.ballman s suggestion. https://reviews.llvm.org/D40819 Files: include/clang/AST/Decl.h include/clang/Basic/Attr.td include/clang/Basic/DiagnosticSemaKinds.td include/clang/Basic/Targ

[PATCH] D36952: [libclang] Add support for checking abstractness of records

2017-12-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Sure, I'll do it today. https://reviews.llvm.org/D36952 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39994: Loosen MSVC 2017 path requirements

2017-12-14 Thread David Major via Phabricator via cfe-commits
dmajor added a comment. > Anyway, I'm just venting. If rnk@ wants to lgtm this, I'm fine. @rnk, any objection to this patch? https://reviews.llvm.org/D39994 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mail

[PATCH] D40478: Added Instrument Control Flow Flag

2017-12-14 Thread Oren Ben Simhon via Phabricator via cfe-commits
oren_ben_simhon updated this revision to Diff 127008. oren_ben_simhon added a comment. Implemented all comments posted until 12/14 (Thanks Peter) Repository: rL LLVM https://reviews.llvm.org/D40478 Files: include/clang/Driver/Options.td include/clang/Frontend/CodeGenOptions.def lib/Cod

[PATCH] D41054: Teach clang/NetBSD about additional dependencies for sanitizers

2017-12-14 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. I'm not really a fan of linking libutil into all binaries. Why is this code using forkpty in first place and not posix_openpt/grantpt? Repository: rL LLVM https://reviews.llvm.org/D41054 ___ cfe-commits mailing list cfe-co

[PATCH] D41224: [ThreadSafetyAnalysis] Fix isCapabilityExpr

2017-12-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. This LGTM, but you should wait to commit for a few days in case @delesley has any concerns. Repository: rC Clang https://reviews.llvm.org/D41224 __

[PATCH] D41054: Teach clang/NetBSD about additional dependencies for sanitizers

2017-12-14 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. In https://reviews.llvm.org/D41054#955755, @joerg wrote: > I'm not really a fan of linking libutil into all binaries. Why is this code > using forkpty in first place and not posix_openpt/grantpt? pid_t forkpty(int *amaster, char *name, struct termios *term, s

[PATCH] D41054: Teach clang/NetBSD about additional dependencies for sanitizers

2017-12-14 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added a comment. One problem with interceptors is that any sanitized binary looks (to a configure-like script) as if it implements forkpty. But an attempt to use forkpty without actually linking -lutil will fail at runtime, because interceptors are just wrappers. Repository: rL LLVM

[clang-tools-extra] r320743 - [clangd] Put all #includes in one block in clangd source files. NFC

2017-12-14 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Dec 14 13:22:03 2017 New Revision: 320743 URL: http://llvm.org/viewvc/llvm-project?rev=320743&view=rev Log: [clangd] Put all #includes in one block in clangd source files. NFC Clang-format categorizes and sorts #includes with style. It doesn't make sense to manually manag

[PATCH] D41054: Teach clang/NetBSD about additional dependencies for sanitizers

2017-12-14 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. `-lutil` is just the same case as `-lrt` or `-lm` here. The potential problem with with autoconf and similar is the design problem, not NetBSD linking here with -lutil. Without this -lutil, every sanitizer with interceptors will generate spurious dlerror() errors f

[PATCH] D41054: Teach clang/NetBSD about additional dependencies for sanitizers

2017-12-14 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added a comment. Yes, I support adding -lutil - sorry I was not clear about that. By dlerror() errors, do you mean the warnings about missing interceptors that appear with verbosity=1 (non-fatal), or something else? Repository: rL LLVM https://reviews.llvm.org/D41054

[PATCH] D41054: Teach clang/NetBSD about additional dependencies for sanitizers

2017-12-14 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. In particular, this issue has been detected with dtls_test.c (MSan test), but it is valid to every program checking dlerror(). I've pluged more missing symbols through https://reviews.llvm.org/D41053, there are still few but I'm now busy with teaching sanitizers abo

[PATCH] D40925: Add option -fkeep-static-consts

2017-12-14 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. This isn't sufficient, GlobalDCE will remove the internal constant. It's also unlikely that the constant will survive `--gc-sections / -fdata-sections`. A better solution would be to add a new attribute (`__attribute__((nondiscardable))`? too close to `nodiscard`?) that add

[PATCH] D41258: [analyzer] trackNullOrUndefValue: deduplicate path pieces for each node.

2017-12-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet. Herald added subscribers: cfe-commits, rnkovacs. This addresses the regression in https://reviews.llvm.org/D41254 in `inlining/path-notes.cpp` by adding a new straightforward mechanism that

r320747 - Revert "[ClangFormat] IndentWrappedFunctionNames should be true in the google ObjC style"

2017-12-14 Thread Ben Hamilton via cfe-commits
Author: benhamilton Date: Thu Dec 14 13:44:11 2017 New Revision: 320747 URL: http://llvm.org/viewvc/llvm-project?rev=320747&view=rev Log: Revert "[ClangFormat] IndentWrappedFunctionNames should be true in the google ObjC style" This reverts commit 37e69667f748e1458b46483b7c1b8f9ba33eec44. We're

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

2017-12-14 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. @compnerd's suggestion is still a decent one: https://reviews.llvm.org/D31372 Which, I think is just adding something wacky like `@swiftcc@__Swift@@` which would demangle as `__Swift::swiftcc` if the demangler expected an NNS there. Of course, it doesn't, so it won't demang

[PATCH] D41259: [debuginfo] Remove temporary FIXME.

2017-12-14 Thread Don Hinton via Phabricator via cfe-commits
hintonda created this revision. hintonda added reviewers: zturner, aprantl. Herald added a subscriber: JDevlieghere. Now that r320495, "[debuginfo-tests] Support moving debuginfo-tests to llvm/projects," has landed, remove temporary FIXME that supported the old mechanism. Repository: rC Clang

r320748 - [libclang] Add support for checking abstractness of records

2017-12-14 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Thu Dec 14 14:01:50 2017 New Revision: 320748 URL: http://llvm.org/viewvc/llvm-project?rev=320748&view=rev Log: [libclang] Add support for checking abstractness of records This patch allows checking whether a C++ record declaration is abstract through libclang and clang.cin

[PATCH] D36952: [libclang] Add support for checking abstractness of records

2017-12-14 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL320748: [libclang] Add support for checking abstractness of records (authored by arphaman, committed by ). Changed prior to commit: https://reviews.llvm.org/D36952?vs=126298&id=127021#toc Repository:

[PATCH] D41259: [debuginfo] Remove temporary FIXME.

2017-12-14 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl accepted this revision. aprantl added a comment. This revision is now accepted and ready to land. I suppose this is fine, please check on the green dragon builders after committing to make sure there's no unexpected fallout. Repository: rC Clang https://reviews.llvm.org/D41259 ___

r320750 - Fix many -Wsign-compare and -Wtautological-constant-compare warnings.

2017-12-14 Thread Zachary Turner via cfe-commits
Author: zturner Date: Thu Dec 14 14:07:03 2017 New Revision: 320750 URL: http://llvm.org/viewvc/llvm-project?rev=320750&view=rev Log: Fix many -Wsign-compare and -Wtautological-constant-compare warnings. Most of the -Wsign-compare warnings are due to the fact that enums are signed by default in t

r320751 - [debuginfo] Remove temporary FIXME.

2017-12-14 Thread Don Hinton via cfe-commits
Author: dhinton Date: Thu Dec 14 14:12:46 2017 New Revision: 320751 URL: http://llvm.org/viewvc/llvm-project?rev=320751&view=rev Log: [debuginfo] Remove temporary FIXME. Summary: Now that r320495, "[debuginfo-tests] Support moving debuginfo-tests to llvm/projects," has landed, remove temporary FI

[PATCH] D41259: [debuginfo] Remove temporary FIXME.

2017-12-14 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC320751: [debuginfo] Remove temporary FIXME. (authored by dhinton, committed by ). Changed prior to commit: https://reviews.llvm.org/D41259?vs=127019&id=127025#toc Repository: rC Clang https://review

r320752 - Harmonize GNU- and C++-style attribute spellings.

2017-12-14 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Thu Dec 14 14:17:09 2017 New Revision: 320752 URL: http://llvm.org/viewvc/llvm-project?rev=320752&view=rev Log: Harmonize GNU- and C++-style attribute spellings. Most attributes will now use the Clang<"name"> construct to provide both __attribute__((name)) and [[clang:

[PATCH] D36790: [ObjC] Messages to 'self' in class methods that return 'instancetype' should use the pointer to the class as the result type of the message

2017-12-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. ping Repository: rL LLVM https://reviews.llvm.org/D36790 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40625: Harmonizing attribute GNU/C++ spellings

2017-12-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Committed (with additional comments on deviating attributes) in r320752. https://reviews.llvm.org/D40625 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org

[PATCH] D41224: [ThreadSafetyAnalysis] Fix isCapabilityExpr

2017-12-14 Thread Yi Kong via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC320753: [ThreadSafetyAnalysis] Fix isCapabilityExpr (authored by kongyi, committed by ). Repository: rC Clang https://reviews.llvm.org/D41224 Files: lib/Sema/SemaDeclAttr.cpp test/Sema/attr-capabi

[PATCH] D41080: Don't trigger -Wuser-defined-literals for system headers

2017-12-14 Thread Dimitry Andric via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC320755: Don't trigger -Wuser-defined-literals for system headers (authored by dim, committed by ). Changed prior to commit: https://reviews.llvm.org/D41080?vs=126436&id=127029#toc Repository: rC Clan

r320755 - Don't trigger -Wuser-defined-literals for system headers

2017-12-14 Thread Dimitry Andric via cfe-commits
Author: dim Date: Thu Dec 14 14:32:24 2017 New Revision: 320755 URL: http://llvm.org/viewvc/llvm-project?rev=320755&view=rev Log: Don't trigger -Wuser-defined-literals for system headers Summary: In D41064, I proposed adding `#pragma clang diagnostic ignored "-Wuser-defined-literals"` to some of

[PATCH] D39694: [VerifyDiagnosticConsumer] support -verify=

2017-12-14 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added inline comments. Comment at: lib/Frontend/VerifyDiagnosticConsumer.cpp:398 +// DToken is foo-bar-warning, but foo is the only -verify prefix). +if (Prefixes.end() == std::find(Prefixes.begin(), Prefixes.end(), DToken)) + continue; > Con

[PATCH] D40809: [WIP] [analyzer] Dump counterexample traces as C programs

2017-12-14 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. In https://reviews.llvm.org/D40809#954890, @NoQ wrote: > In https://reviews.llvm.org/D40809#954858, @dcoughlin wrote: > > > One possibility is to turn this into a debug checker similar to > > debug.ViewExplodedGraph. That checker registers for a checkEndAnalysis() > >

[PATCH] D40809: [WIP] [analyzer] Dump counterexample traces as C programs

2017-12-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D40809#955929, @dcoughlin wrote: > As it stands, this is a debugging tool not a way to communicate error paths > to end users. (I think that, too, would be very helpful but I'd like to see > this as a debugging aid first.) The workflow for debugg

[PATCH] D40809: [WIP] [analyzer] Dump counterexample traces as C programs

2017-12-14 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @dcoughlin my current iteration creates a `PathDiagnosticConsumer` which outputs HTML with this report. I think that makes much more sense (as essentially this is a way of visualizing the error path). https://reviews.llvm.org/D40809

[PATCH] D36952: [libclang] Add support for checking abstractness of records

2017-12-14 Thread Johann Klähn via Phabricator via cfe-commits
jklaehn added a comment. Thanks! However, compared to diff 126298 (https://reviews.llvm.org/differential/diff/126298/), there seems to be duplication in the committed change (maybe some artifacts due to rebasing/merging?). Should I submit a follow-up patch to fix this? Comme

[PATCH] D40813: [clang-tidy] Adding Fuchsia checker for virtual inheritance

2017-12-14 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 127033. juliehockett added a comment. Updating checker to only warn on declarations. https://reviews.llvm.org/D40813 Files: clang-tidy/fuchsia/CMakeLists.txt clang-tidy/fuchsia/FuchsiaTidyModule.cpp clang-tidy/fuchsia/VirtualInheritanceCheck.cpp

[PATCH] D40813: [clang-tidy] Adding Fuchsia checker for virtual inheritance

2017-12-14 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett marked 3 inline comments as done. juliehockett added inline comments. Comment at: test/clang-tidy/fuchsia-virtual-inheritance.cpp:34-36 + // CHECK-MESSAGES: [[@LINE-1]]:28: warning: constructing a class that inherits a virtual base class is disallowed [fuchsia-virt

[PATCH] D41261: [libcxxabi][demangler] Special case demangling for pass_object_size attribute

2017-12-14 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: EricWF, george.burgess.iv. This patch adds demangling for pass_object_size attribute (https://clang.llvm.org/docs/AttributeReference.html#pass-object-size). This attribute applies to function parameters. This attribute is ma

r320763 - D40901: Refactor lazy loading of template specializations. NFC

2017-12-14 Thread Vassil Vassilev via cfe-commits
Author: vvassilev Date: Thu Dec 14 15:30:18 2017 New Revision: 320763 URL: http://llvm.org/viewvc/llvm-project?rev=320763&view=rev Log: D40901: Refactor lazy loading of template specializations. NFC Modified: cfe/trunk/include/clang/AST/DeclTemplate.h cfe/trunk/lib/AST/DeclTemplate.cpp M

[PATCH] D40901: Refactor lazy loading of template specializations. NFC

2017-12-14 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev closed this revision. v.g.vassilev added a comment. Thanks! Landed in r320763. https://reviews.llvm.org/D40901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r320765 - Correct UnaryTransformTypeLoc to properly initialize.

2017-12-14 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Thu Dec 14 15:37:08 2017 New Revision: 320765 URL: http://llvm.org/viewvc/llvm-project?rev=320765&view=rev Log: Correct UnaryTransformTypeLoc to properly initialize. The initializeLocal function of UnaryTransformTypeLoc missed the UnderlyingTInfo member. This caused a nu

[PATCH] D36952: [libclang] Add support for checking abstractness of records

2017-12-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D36952#955937, @jklaehn wrote: > Thanks! However, compared to diff 126298 > (https://reviews.llvm.org/differential/diff/126298/), there seems to be > duplication in the committed change (maybe some artifacts due to > rebasing/merging?). Sho

r320766 - Remove duplicate python libclang changes from r320748

2017-12-14 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Thu Dec 14 15:40:42 2017 New Revision: 320766 URL: http://llvm.org/viewvc/llvm-project?rev=320766&view=rev Log: Remove duplicate python libclang changes from r320748 Modified: cfe/trunk/bindings/python/clang/cindex.py cfe/trunk/bindings/python/tests/cindex/test_curs

[PATCH] D36952: [libclang] Add support for checking abstractness of records

2017-12-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Fixed in r320766. Sorry about that! Repository: rL LLVM https://reviews.llvm.org/D36952 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40451: [OpenMP] Add function attribute for triggering shared memory lowering in the LLVM backend

2017-12-14 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel accepted this revision. hfinkel added a comment. This revision is now accepted and ready to land. LGTM Comment at: lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:937 if (!CapturedVars.empty()) { + // There's somehting to share, add the attribute + CGF.CurFn->addFnA

[PATCH] D41261: [libcxxabi][demangler] Special case demangling for pass_object_size attribute

2017-12-14 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. Thanks for working on this! Unfortunately, I've never touched demanglers before, so I don't think I can LGTM this patch. > This attribute is mangled as if it was meant to match the > production. Yup, definitely a mistake. Apologies. :) C

[PATCH] D32747: [Analyzer] Iterator Checker - Part 3: Invalidation check, first for (copy) assignments

2017-12-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Herald added subscribers: a.sidorin, rnkovacs, szepet. Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:605 + if (Pos && !Pos->isValid()) { +// If I do not put a tag here, some invalidation tests will fail +static CheckerProgramPoint

[PATCH] D32642: [Analyzer] Iterator Checker - Part 2: Increment, decrement operators and ahead-of-begin checks

2017-12-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Herald added subscribers: a.sidorin, rnkovacs, szepet. This patch would be in a good shape once we settle the rearrangement stuff. I had a look at all follow-up patches and identified other, hopefully smaller, places where i have overall design concerns; otherwise, the rest

[PATCH] D32845: [Analyzer] Iterator Checker - Part 4: Mismatched iterator checker for function parameters

2017-12-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Herald added subscribers: a.sidorin, rnkovacs, szepet. Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:340-358 +const auto *Templ = Func->getPrimaryTemplate(); +if (!Templ) + return; + +const auto *TParams = Templ->getTempla

[PATCH] D32859: [Analyzer] Iterator Checker - Part 5: Move Assignment of Containers

2017-12-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Herald added subscribers: a.sidorin, rnkovacs, szepet. Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:1489-1511 +SymbolRef replaceSymbol(SymbolManager &SymMgr, SymbolRef OrigExpr, +SymbolRef OldExpr, SymbolRef NewSym

[PATCH] D32860: [Analyzer] Iterator Checker - Part 6: Mismatched iterator checker for constructors and comparisons

2017-12-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Herald added subscribers: a.sidorin, rnkovacs, szepet. This looks clear to me. Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:554-555 + + verifyMatch(C, State->getSVa

[PATCH] D32902: [Analyzer] Iterator Checker - Part 7: Support for push and pop operations

2017-12-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Herald added subscribers: a.sidorin, rnkovacs, szepet. This looks clear to me. Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:1449-1464 +const CXXRecordDecl *getCXXRec

[PATCH] D32904: [Analyzer] Iterator Checker - Part 8: Support for assign, clear, insert, emplace and erase operations

2017-12-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Herald added subscribers: a.sidorin, rnkovacs, szepet. This looks clear to me. https://reviews.llvm.org/D32904 ___ cfe-commits mailing list cfe-commits

[PATCH] D32905: [Analyzer] Iterator Checker - Part 9: Evaluation of std::find-like calls

2017-12-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Herald added subscribers: a.sidorin, rnkovacs, szepet. Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:1584-1588 + auto stateFound = state->BindExpr(CE, LCtx, RetVal); + auto stateNotFound = state->BindExpr(CE, LCtx, SecondParam); + + C.a

[PATCH] D32906: [Analyzer] Iterator Checker - Part 10: Support for iterators passed as parameter

2017-12-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Herald added subscribers: a.sidorin, rnkovacs, szepet. I really hope that i'd be able to do something about pass-by-copy in C++, because there's a lot of mess there. I approve this trick unless i act

[PATCH] D35109: [Analyzer] SValBuilder Comparison Rearrangement

2017-12-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Herald added a subscriber: rnkovacs. In https://reviews.llvm.org/D35109#943558, @baloghadamsoftware wrote: > In https://reviews.llvm.org/D35109#937763, @NoQ wrote: > > > For the type extension approach, somebody simply needs to do the math and > > prove that it works soundly

[PATCH] D40299: [Complex] Don't use __div?c3 when building with fast-math.

2017-12-14 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added inline comments. Comment at: lib/CodeGen/CGExprComplex.cpp:773 // supported imaginary types in addition to complex types. -if (RHSi) { +if (RHSi && !FMF.isFast()) { BinOpInfo LibCallOp = Op; fhahn wrote: > Would the following str

[PATCH] D24933: Enable configuration files in clang

2017-12-14 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added inline comments. Comment at: lib/Driver/Driver.cpp:641 + +static std::string getAbsolutePath(StringRef P) { + if (P.empty()) Use llvm::sys::fs::make_absolute instead of this. https://reviews.llvm.org/D24933

[PATCH] D41102: Setup clang-doc frontend framework

2017-12-14 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 127053. juliehockett marked 8 inline comments as done. https://reviews.llvm.org/D41102 Files: tools/CMakeLists.txt tools/clang-doc/CMakeLists.txt tools/clang-doc/ClangDoc.cpp tools/clang-doc/ClangDoc.h tools/clang-doc/ClangDocReporter.cpp too

[PATCH] D40813: [clang-tidy] Adding Fuchsia checker for virtual inheritance

2017-12-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. Aside from some documentation nits, LGTM! Comment at: docs/clang-tidy/checks/fuchsia-virtual-inheritance.rst:6 + +Warns if classes are defined or created with v

[PATCH] D41102: Setup clang-doc frontend framework

2017-12-14 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett added inline comments. Comment at: tools/clang-doc/ClangDocReporter.h:35 + +struct StringPair { + std::string Key; JDevlieghere wrote: > Do you still need this? Yes, it's used to serialize the map to yaml. https://reviews.llvm.org/D41102 __

[PATCH] D41266: [analyzer] With c++-allocator-inlining, fix memory space for operator new pointers.

2017-12-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet. Herald added subscribers: cfe-commits, rnkovacs. Default global `operator new()`, like `malloc()`, should return heap pointers, which in the analyzer are represented by `SymbolicRegion`s wit

Re: r320750 - Fix many -Wsign-compare and -Wtautological-constant-compare warnings.

2017-12-14 Thread Galina Kistanova via cfe-commits
Hello Zachary, It looks like this commit added an error to one of our builders: http://lab.llvm.org:8011/builders/ubuntu-gcc7.1-werror/builds/3735 . . . FAILED: /usr/local/gcc-7.1/bin/g++-7.1 -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMI

[PATCH] D40594: [InstCombine] miscompile of __builtin_fmod

2017-12-14 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D40594#940571, @spatel wrote: > Added a blurb to the LangRef with https://reviews.llvm.org/rL319437, so I > think we can abandon this patch. Sounds good. https://reviews.llvm.org/D40594 ___ cf

[PATCH] D41077: [analyser] different.CallArgsOrder checker implementation

2017-12-14 Thread Anna Thomas via Phabricator via cfe-commits
anna resigned from this revision. anna added a comment. Perhaps added me incorrectly as reviewer? Repository: rC Clang https://reviews.llvm.org/D41077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D24933: Enable configuration files in clang

2017-12-14 Thread Don Hinton via Phabricator via cfe-commits
hintonda added inline comments. Comment at: include/clang/Config/config.h.cmake:40 +#cmakedefine CLANG_CONFIG_FILE_SYSTEM_DIR ${CLANG_CONFIG_FILE_SYSTEM_DIR} +#cmakedefine CLANG_CONFIG_FILE_USER_DIR ${CLANG_CONFIG_FILE_USER_DIR} + These need to be in quotes since

[PATCH] D38639: [clangd] #include statements support for Open definition

2017-12-14 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle requested changes to this revision. malaperle added inline comments. This revision now requires changes to proceed. Comment at: clangd/ClangdServer.cpp:454 + +IncludeReferenceMap IRM = std::move(AST->takeIRM()); +Result = clangd::findDefinitions(*AST, Pos, Logge

[PATCH] D39375: [clang] Add PPCallbacks list to preprocessor when building a preacompiled preamble.

2017-12-14 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle accepted this revision. malaperle added a comment. Looks good to me. But this is not really my area :) Repository: rC Clang https://reviews.llvm.org/D39375 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D41261: [libcxxabi][demangler] Special case demangling for pass_object_size attribute

2017-12-14 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 127067. erik.pilkington added a comment. Add a testcase with pass_object_size[0-3]. https://reviews.llvm.org/D41261 Files: src/cxa_demangle.cpp test/test_demangle.pass.cpp Index: test/test_demangle.pass.cpp

[PATCH] D41103: [CMake] Allow passing extra CMake arguments to custom libc++

2017-12-14 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In https://reviews.llvm.org/D41103#955540, @vitalybuka wrote: > Can you please add some details about why someone wants to customize LIBXX > here? > Or even better attach a patch which uses this. I plan on using it from https://reviews.llvm.org/D37631 where I currently

[PATCH] D36790: [ObjC] Messages to 'self' in class methods that return 'instancetype' should use the pointer to the class as the result type of the message

2017-12-14 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaExprObjC.cpp:1357 +(ReceiverType->isObjCClassOrClassKindOfType() || + ReceiverType->isObjCQualifiedClassType()) && +Receiver->isObjCSelfExpr() && getLangOpts().ObjCAutoRefCount) { Wh

[PATCH] D41223: [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default constructible types.

2017-12-14 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray added inline comments. Comment at: include/array:135 + _LIBCPP_INLINE_VISIBILITY + static void __swap(_StorageT& __lhs, _StorageT& __rhs) { +std::swap_ranges(__lhs, __lhs + _Size, __rhs); Just asking: no compiler is dumb enough to not inline this en

[PATCH] D41087: [Preprocessor] Implement __is_target_{arch|vendor|os|environment} function-like builtin macros

2017-12-14 Thread Bob Wilson via Phabricator via cfe-commits
bob.wilson added a comment. I'm concerned here about the check for the names as written vs. the canonical names. @compnerd pointed out one specific case with armv7, and I see that you've got special handling for "darwin", but I think there are more. What about "arm64" vs. the canonical "aarch64

[PATCH] D41271: [RISCV] Propagate -mabi and -march values to GNU assembler.

2017-12-14 Thread Alex Bradbury via Phabricator via cfe-commits
asb edited subscribers, added: cfe-commits; removed: llvm-commits. asb added a comment. Removing llvm-commits and adding cfe-commits. Thanks Ana. This looks good to me. We probably should have a default march, but I don't know what it should be. If most clang targets default to a Linux-capable

[PATCH] D41271: [RISCV] Propagate -mabi and -march values to GNU assembler.

2017-12-14 Thread Alex Bradbury via Phabricator via cfe-commits
asb added inline comments. Comment at: test/Driver/riscv-gnutools.c:6 +// RUN: %clang -target riscv64-unknown-elf -fno-integrated-as %s -### \ +// RUN: 2>&1 | FileCheck -check-prefix=MABI-ILP64 %s + s/MABI-ILP64/MABI-LP64 https://reviews.llvm.org/D41271

<    1   2