[PATCH] D65192: [Sema] Disable some enabled-by-default -Wparentheses diagnostics

2019-07-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 211425. MaskRay edited the summary of this revision. MaskRay added a comment. Delete -Wmost from the hierarchy. It doesn't belong there Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65192/new/ https://reviews.llvm.org/D65192

[PATCH] D65192: [Sema] Disable some enabled-by-default -Wparentheses diagnostics

2019-07-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: akyrtzi, jyknight, rtrieu, rsmith. Herald added subscribers: cfe-commits, dexonsmith. Herald added a project: clang. The -Wparentheses warnings are enabled by default in clang but they are under -Wall in gcc (gcc/c-family/c.opt). Many of the

[PATCH] D64717: [Clangd] Fixed ExtractVariable for MemberExprs and Assignment Exprs

2019-07-23 Thread Shaurya Gupta via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb0ed5bea8812: [Clangd] Fixed ExtractVariable for certain types of Exprs (authored by SureYeaah). Changed prior to commit: https://reviews.llvm.org/D64717?vs=210803=211423#toc Repository: rG LLVM

[clang-tools-extra] r366869 - [Clangd] Fixed ExtractVariable for certain types of Exprs

2019-07-23 Thread Shaurya Gupta via cfe-commits
Author: sureyeaah Date: Tue Jul 23 22:42:55 2019 New Revision: 366869 URL: http://llvm.org/viewvc/llvm-project?rev=366869=rev Log: [Clangd] Fixed ExtractVariable for certain types of Exprs Summary: - Modified ExtractVariable for extraction of MemberExpr, DeclRefExpr and Assignment Expr -

[PATCH] D65176: [NFC][clang] Refactor getCompilationPhases()+Types.def step 2.

2019-07-23 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. This looks good to me generally. I don't fully understand the reason for `u` being kept, is that something you intend to clean up in a subsequent patch? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65176/new/

[PATCH] D65183: [Format] Make it easy to add new format::FormatStyle::LanguageStandard. NFCI

2019-07-23 Thread Brian Gesiak via Phabricator via cfe-commits
modocache added a comment. LGTM, but I don't actively work in this codebase so I really can't say. I'll wait to hear from some other more active clang-format reviewers. Comment at: lib/Format/TokenAnnotator.cpp:2862 return Right.is(TT_TemplateCloser) &&

[PATCH] D65182: [analyzer] WIP: Add fix-it hint support.

2019-07-23 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Also if we ever implement any fixits for path-sensitive reports that actually make sense, i suspect that it might as well make sense to attach fixits to individual path notes. For examples, if we report a double-free, we may attach a removal of the second free to the

[PATCH] D65169: [WIP] LLVM Optimization Remark for Attributes

2019-07-23 Thread William Moses via Phabricator via cfe-commits
wsmoses updated this revision to Diff 211382. wsmoses removed subscribers: cfe-commits, llvm-commits. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65169/new/ https://reviews.llvm.org/D65169 Files: clang/include/clang/Basic/Attr.td

[PATCH] D65183: [Format] Make it easy to add new format::FormatStyle::LanguageStandard. NFCI

2019-07-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: modocache, MyDeveloperDay, klimek, rsmith, sammccall, Typz. Herald added a project: clang. Herald added a subscriber: cfe-commits. Preparatory change for D65043 . We current use `!=LS_Cpp03` to enable

[PATCH] D65182: [analyzer] WIP: Add fix-it hint support.

2019-07-23 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a_sidorin, rnkovacs, Szelethus, baloghadamsoftware. Herald added subscribers: cfe-commits, Charusso, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet, kristof.beyls, javed.absar. Herald added a project: clang. That's a

[PATCH] D65180: [analyzer] VirtualCallChecker: Improve warning messages.

2019-07-23 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 211399. NoQ added a comment. - Hmm, also i'd rather say "method" than "function". CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65180/new/ https://reviews.llvm.org/D65180 Files: clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp

[PATCH] D65180: [analyzer] VirtualCallChecker: Improve warning messages.

2019-07-23 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 211397. NoQ added a comment. - Print only class name::method name instead of a fully qualified name, because fully qualified names may get pretty long. - Remove more dead code. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65180/new/

[PATCH] D65180: [analyzer] VirtualCallChecker: Improve warning messages.

2019-07-23 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a_sidorin, rnkovacs, Szelethus, baloghadamsoftware, Charusso. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet. Herald added a project: clang. NoQ added a parent revision: D64274:

[PATCH] D59254: [RFC] Implementation of Clang randstruct

2019-07-23 Thread Connor Kuehl via Phabricator via cfe-commits
connorkuehl added a comment. In D59254#1429401 , @jfb wrote: > I find it easier to understand the code by looking at the tests. When you add > tests, please make sure you test for: > > - Bit-fields > - Zero-width bit-field Hi JF, Could you elaborate

[PATCH] D63907: [clang-scan-deps] Implementation of dependency scanner over minimized sources

2019-07-23 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. I will take a look next week when I get back! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63907/new/ https://reviews.llvm.org/D63907 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D65176: [NFC][clang] Refactor getCompilationPhases()+Types.def step 2.

2019-07-23 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi created this revision. plotfi added reviewers: aaron.ballman, compnerd. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Removing a few of the entries in the Flags for the Types.def table. - Removing redundant parts of getCompilationPhases(). Repository: rG LLVM

[PATCH] D64274: [analyzer] VirtualCallChecker overhaul.

2019-07-23 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ marked an inline comment as done. NoQ added a comment. In D64274#1586282 , @Szelethus wrote: > //Ackchyually//, it doesn't per se break anything, but will result in > CodeChecker no longer enabling `optin.cplusplus.VirtualCall` :^) Sorry, >

[PATCH] D63907: [clang-scan-deps] Implementation of dependency scanner over minimized sources

2019-07-23 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 211385. arphaman added a comment. Fix a bug for empty minimized files where null terminator lookup by the lexer was an out of bounds read CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63907/new/ https://reviews.llvm.org/D63907 Files:

[PATCH] D64666: [Sema] Enable -Wimplicit-float-conversion for integral to floating point precision loss

2019-07-23 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. Thanks, the update looks good. One thing I just noticed: if I have a codebase with `-Wimplicit-float-conversion` it seems like updating clang will automatically turn the two new warnings on, correct? That seems good, but also difficult to roll out because I can't turns

[PATCH] D64666: [Sema] Enable -Wimplicit-float-conversion for integral to floating point precision loss

2019-07-23 Thread Ziang Wan via Phabricator via cfe-commits
ziangwan updated this revision to Diff 211381. ziangwan added a comment. Update diff. 1. Make "definitely lose" warning on by default. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64666/new/ https://reviews.llvm.org/D64666 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D65169: [WIP] LLVM Optimization Remark for Attributes

2019-07-23 Thread William Moses via Phabricator via cfe-commits
wsmoses updated this revision to Diff 211371. wsmoses edited the summary of this revision. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65169/new/ https://reviews.llvm.org/D65169 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Basic/DiagnosticFrontendKinds.td

[PATCH] D63954: Add lifetime categories attributes

2019-07-23 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre updated this revision to Diff 211370. mgehre marked 4 inline comments as done. mgehre added a comment. - Diagnose unions; improve other diagnostics; fix all comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63954/new/

[PATCH] D63954: Add lifetime categories attributes

2019-07-23 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre marked 2 inline comments as done. mgehre added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:4167 + +The attribute ``[[gsl::Owner(T)]]`` applies to structs and classes that own an +object of type ``T``: aaron.ballman wrote: > Do

[PATCH] D65169: [WIP] LLVM Optimization Remark for Attributes

2019-07-23 Thread William Moses via Phabricator via cfe-commits
wsmoses created this revision. Herald added subscribers: llvm-commits, cfe-commits, hiraditya, mgorny, mehdi_amini. Herald added projects: clang, LLVM. This is a *work in progress* patch illustrating how an optimization remark that prints out derived function/argument attributes could be

[PATCH] D64666: [Sema] Enable -Wimplicit-float-conversion for integral to floating point precision loss

2019-07-23 Thread Ziang Wan via Phabricator via cfe-commits
ziangwan marked an inline comment as done. ziangwan added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:3279 + "implicit conversion from %2 to %3 changes value from %0 to %1">, + InGroup, DefaultIgnore; + xbolva00 wrote: > Drop

[PATCH] D64753: [CrossTU][NFCI] Refactor loadExternalAST function

2019-07-23 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 211363. gamesh411 added a comment. Too much autoformat fixed Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64753/new/ https://reviews.llvm.org/D64753 Files:

[PATCH] D64678: [Sema] Fix -Wuninitialized for struct assignment from GNU C statement expression

2019-07-23 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers accepted this revision. nickdesaulniers added a comment. This revision is now accepted and ready to land. Thanks for the patch and following up on the review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64678/new/

[PATCH] D64938: [clang-doc] Add option for user provided stylesheets

2019-07-23 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran updated this revision to Diff 211362. DiegoAstiazaran marked an inline comment as done. DiegoAstiazaran added a comment. Add a second CSS file to one of the tests in HTMLGeneratorTest.cpp CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64938/new/

[PATCH] D64753: [CrossTU][NFCI] Refactor loadExternalAST function

2019-07-23 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 211361. gamesh411 added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Refactor functionality into local classes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64753/new/

[PATCH] D65050: [SemaTemplate] Mark a function type as dependent when its parameter list contains pack expansion

2019-07-23 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner added a comment. In D65050#1596514 , @efriedma wrote: > Is this the only place where a compound type can contain a PackExpansionType? Yes AFAIK. No other place can contain a list or a pack expansion. The closest thing is dynamic exception

[PATCH] D65050: [SemaTemplate] Mark a function type as dependent when its parameter list contains pack expansion

2019-07-23 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner updated this revision to Diff 211358. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65050/new/ https://reviews.llvm.org/D65050 Files: clang/lib/AST/Type.cpp clang/test/SemaTemplate/alias-templates.cpp Index: clang/test/SemaTemplate/alias-templates.cpp

[PATCH] D65110: [NewPM] Run avx*-builtins.c tests under the new pass manager only

2019-07-23 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added inline comments. Comment at: clang/test/CodeGen/avx512vlbw-builtins.c:904 + // CHECK: [[TMP:%.*]] = bitcast [[SRCTY:<.*>]] [[SEL]] to [[DSTTY:<.*>]] + // CHECK: [[SEL:%.*]] = bitcast [[DSTTY]] [[TMP]] to [[SRCTY]] // CHECK: select <16 x i1> %{{.*}}, <16 x i8>

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-07-23 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry added a comment. In D64454#1587102 , @aaron.ballman wrote: > I think this looks reasonable to me, though I am still not certain if the > relative path in the python script will work with both the svn in-tree > directory layout as

[PATCH] D65107: [clang-doc] Fix html entities in rendered text

2019-07-23 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett accepted this revision. juliehockett added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65107/new/ https://reviews.llvm.org/D65107 ___ cfe-commits mailing list

[PATCH] D64938: [clang-doc] Add option for user provided stylesheets

2019-07-23 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett added inline comments. Comment at: clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp:26 + ClangDocContext CDCtx; + CDCtx.UserStylesheets = {"../share/clang/clang-doc-default-stylesheet.css"}; + return CDCtx; Can you write a test for the

[PATCH] D64539: [clang-doc] Add stylesheet to generated html docs

2019-07-23 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett accepted this revision. juliehockett added a comment. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64539/new/ https://reviews.llvm.org/D64539 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D64744: #pragma clang loop vectorize_predicate(enable|disable)

2019-07-23 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added a comment. Apologies for the early ping! Bu I'm off next weeks, so it would be nice to get this in before that if there are no further comments. Tomorrow, I will upload another diff that builds on top D64916 , which enables code-generation

[PATCH] D64914: Implement P1771

2019-07-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked an inline comment as done. aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:2835 + D->getFunctionType()->getReturnType()->isVoidType() && + !isa(D)) { S.Diag(AL.getLoc(),

[PATCH] D64914: Implement P1771

2019-07-23 Thread Erich Keane via Phabricator via cfe-commits
erichkeane marked 2 inline comments as done. erichkeane added a comment. Ugg... well conversion functions are an interesting bit, as well as Type{}; with no constructors. It ends up being a function style cast to an init-list-expr, so its going to require a bit more work. Stay tuned :)

[PATCH] D64638: [CrossTU] Fix plist macro expansion if macro in other file.

2019-07-23 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. The preprocessor is defined in `Lex`, so i guess i'm curious about a more precise description of what's impossible to do without `Frontend`. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64638/new/ https://reviews.llvm.org/D64638

[PATCH] D65154: [clangd] Reformat use of cl::opt: use unqualified name and don't bin-pack attributes. NFC

2019-07-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. That LGTM, but i didn't have any bad feelings regarding the previous state. Since we tend to read those options in isolation and don't care about how they look like in general, but that

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-07-23 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.h:2110 + /// Emit code for the user defined mapper construct. + void emitUserDefinedMapper(const OMPDeclareMapperDecl *D, + CodeGenFunction *CGF = nullptr) override;

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-07-23 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked 3 inline comments as done. lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:7116-7124 + /// Get the offset of the OMP_MAP_MEMBER_OF field. + static unsigned getFlagMemberOffset() { +unsigned Offset = 0; +for (uint64_t Remain =

[PATCH] D64696: Adds a warning when an inline Doxygen comment has no argument

2019-07-23 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 211340. Mordante added a comment. Addresses @gribozavr comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64696/new/ https://reviews.llvm.org/D64696 Files: clang/include/clang/Basic/DiagnosticCommentKinds.td

[PATCH] D64696: Adds a warning when an inline Doxygen comment has no argument

2019-07-23 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 2 inline comments as done. Mordante added a comment. All inline commands defined in include/clang/AST/CommentCommands.td require an argument. The escape commands, like \&, are handled in the switch starting at lib/AST/CommentLexer.cpp:366. They are stored as Text and not as an

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-07-23 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:2533 + CodeGenFunction *CGF) { + if (!LangOpts.OpenMP || LangOpts.OpenMPSimd || + (!LangOpts.EmitAllDecls && !D->isUsed())) lildmh wrote: > ABataev

[PATCH] D64838: [Attr] Support _attribute__ ((fallthrough))

2019-07-23 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> they parse the attributes first then attempt to parse a declaration; if >> that fails, they fall back to parsing a statement Well, I don’t think this reparsing is ideal in terms of compile time either. If we really care about attributes on implicit ints: I don’t

[PATCH] D64793: [Driver] Properly use values-X[ca].o, values-xpg[46].o on Solaris

2019-07-23 Thread Rainer Orth via Phabricator via cfe-commits
ro marked an inline comment as done. ro added a comment. In D64793#1597550 , @jyknight wrote: > Is this really necessary? Users don't typically pass -std= to the driver for > linking anyways (what do you even pass if you've compiled both C and C++ >

[PATCH] D65125: clang-format: Fix namespace end comments for namespaces with attributes and macros

2019-07-23 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366831: clang-format: Fix namespace end comments for namespaces with attributes and… (authored by nico, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

r366831 - clang-format: Fix namespace end comments for namespaces with attributes and macros.

2019-07-23 Thread Nico Weber via cfe-commits
Author: nico Date: Tue Jul 23 10:49:45 2019 New Revision: 366831 URL: http://llvm.org/viewvc/llvm-project?rev=366831=rev Log: clang-format: Fix namespace end comments for namespaces with attributes and macros. Fixes PR39247. While here, also make C++20 `namespace A::inline B::inline C` nested

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-07-23 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 211333. lildmh marked 4 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59474/new/ https://reviews.llvm.org/D59474 Files: include/clang/AST/GlobalDecl.h lib/AST/ASTContext.cpp lib/CodeGen/CGDecl.cpp

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-07-23 Thread Lingda Li via Phabricator via cfe-commits
lildmh added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:2533 + CodeGenFunction *CGF) { + if (!LangOpts.OpenMP || LangOpts.OpenMPSimd || + (!LangOpts.EmitAllDecls && !D->isUsed())) ABataev wrote: > Why do we

[PATCH] D64666: [Sema] Enable -Wimplicit-float-conversion for integral to floating point precision loss

2019-07-23 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:3279 + "implicit conversion from %2 to %3 changes value from %0 to %1">, + InGroup, DefaultIgnore; + Drop ‘DefaultIgnore‘ here CHANGES SINCE LAST ACTION

[PATCH] D65043: [Format] Add C++20 standard to style options

2019-07-23 Thread Brian Gesiak via Phabricator via cfe-commits
modocache added a comment. Friendly ping! I'm wondering, from the clang-format maintainers' point of view, whether a diff like this and https://reviews.llvm.org/D65044 make sense to add? I do think that it is useful for users to specify whether they wish to use C++11 or C++20 constructs, but

[PATCH] D64998: Improve clang-format-diff help output

2019-07-23 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366828: Improve clang-format-diff help output (authored by nico, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

r366828 - Improve clang-format-diff help output

2019-07-23 Thread Nico Weber via cfe-commits
Author: nico Date: Tue Jul 23 10:34:18 2019 New Revision: 366828 URL: http://llvm.org/viewvc/llvm-project?rev=366828=rev Log: Improve clang-format-diff help output The description in clang-format-diff.py is more useful than the one in `clang-format-diff -h`, so use the same description in both

[PATCH] D64883: Add new warning -Walloca for use of builtin alloca function

2019-07-23 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:2776 +def warn_alloca : Warning< + "use of builtin function %0">, + InGroup>, DefaultIgnore; aaron.ballman wrote: > george.burgess.iv wrote: > > aaron.ballman

[PATCH] D64666: [Sema] Enable -Wimplicit-float-conversion for integral to floating point precision loss

2019-07-23 Thread Ziang Wan via Phabricator via cfe-commits
ziangwan added a comment. In D64666#1597627 , @jfb wrote: > In D64666#1597193 , @aaron.ballman > wrote: > > > In D64666#1596660 , @xbolva00 > > wrote: > > > > > I think we

[PATCH] D64838: [Attr] Support _attribute__ ((fallthrough))

2019-07-23 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry added a comment. In D64838#1593516 , @aaron.ballman wrote: > In D64838#1592520 , > @Nathan-Huckleberry wrote: > > > void foo() { > > __attribute__((address_space(0))) *x; > > *y; > >

[PATCH] D64644: Fixes an assertion failure while instantiation a template with an incomplete typo corrected type

2019-07-23 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added reviewers: aaron.ballman, erichkeane. lebedev.ri added a comment. Test looks good, adding a few more potential reviewers.. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64644/new/ https://reviews.llvm.org/D64644 ___

r366823 - [clang][NFCI] Fix random typos

2019-07-23 Thread Jan Korous via cfe-commits
Author: jkorous Date: Tue Jul 23 09:54:11 2019 New Revision: 366823 URL: http://llvm.org/viewvc/llvm-project?rev=366823=rev Log: [clang][NFCI] Fix random typos Modified: cfe/trunk/include/clang/ASTMatchers/ASTMatchersInternal.h cfe/trunk/lib/Index/IndexSymbol.cpp

[PATCH] D65102: [OpenCL] Rename lang mode flag for C++ mode

2019-07-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D65102#1597651 , @kpet wrote: > Hmm, maybe we need to make sure that one of the tests is using a C++ feature > and building with `CLC++`. This would have caught the mistake. That's right! The only test we had wasn't using

[PATCH] D65102: [OpenCL] Rename lang mode flag for C++ mode

2019-07-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 211320. Anastasia added a comment. Use -cl-std=CLC++ spelling for test/CodeGenOpenCLCXX/addrspace-with-class.cl CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65102/new/ https://reviews.llvm.org/D65102 Files: include/clang/Driver/Options.td

Re: r366694 - [NFC] Relaxed regression tests for PR42665

2019-07-23 Thread Anastasia Stulova via cfe-commits
Great! Thanks! From: Hans Wennborg Sent: 23 July 2019 15:58 To: Anastasia Stulova Cc: Marco Antognini ; Clang Commits ; nd Subject: Re: r366694 - [NFC] Relaxed regression tests for PR42665 Merged them both in r366814. Thanks, Hans On Tue, Jul 23, 2019 at

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-07-23 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:2533 + CodeGenFunction *CGF) { + if (!LangOpts.OpenMP || LangOpts.OpenMPSimd || + (!LangOpts.EmitAllDecls && !D->isUsed())) Why do we need to emit it

[PATCH] D65102: [OpenCL] Rename lang mode flag for C++ mode

2019-07-23 Thread Kévin Petit via Phabricator via cfe-commits
kpet added a comment. Hmm, maybe we need to make sure that one of the tests is using a C++ feature and building with `CLC++`. This would have caught the mistake. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65102/new/ https://reviews.llvm.org/D65102

[PATCH] D64487: [clang, test] Fix Clang :: Headers/max_align.c on 64-bit SPARC

2019-07-23 Thread Rainer Orth via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2da6eea07cde: [clang, test] Fix Clang :: Headers/max_align.c on 64-bit SPARC (authored by ro). Changed prior to commit: https://reviews.llvm.org/D64487?vs=208946=211316#toc Repository: rG LLVM

[PATCH] D65102: [OpenCL] Rename lang mode flag for C++ mode

2019-07-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: include/clang/Frontend/LangStandards.def:177 LANGSTANDARD_ALIAS_DEPR(opencl20, "CL2.0") +LANGSTANDARD_ALIAS_DEPR(opencl20, "CLC++") kpet wrote: > Shouldn't this be

[PATCH] D65102: [OpenCL] Rename lang mode flag for C++ mode

2019-07-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 211315. Anastasia added a comment. - Fixed `LANGSTANDARD_ALIAS_DEPR` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65102/new/ https://reviews.llvm.org/D65102 Files: include/clang/Driver/Options.td include/clang/Frontend/LangStandards.def

r366820 - [clang, test] Fix Clang :: Headers/max_align.c on 64-bit SPARC

2019-07-23 Thread Rainer Orth via cfe-commits
Author: ro Date: Tue Jul 23 09:24:00 2019 New Revision: 366820 URL: http://llvm.org/viewvc/llvm-project?rev=366820=rev Log: [clang, test] Fix Clang :: Headers/max_align.c on 64-bit SPARC Clang :: Headers/max_align.c currently FAILs on 64-bit SPARC: error: 'error' diagnostics seen but not

[PATCH] D64666: [Sema] Enable -Wimplicit-float-conversion for integral to floating point precision loss

2019-07-23 Thread JF Bastien via Phabricator via cfe-commits
jfb requested changes to this revision. jfb added a comment. Herald added a subscriber: dexonsmith. In D64666#1597193 , @aaron.ballman wrote: > In D64666#1596660 , @xbolva00 wrote: > > > I think we should warn in

[PATCH] D44100: [ASTImporter] Reorder fields after structure import is finished

2019-07-23 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/unittests/AST/ASTImporterTest.cpp:5244 +} + + a_sidorin wrote: > A redundant newline? Yes, I deleted that. And moved the test case closer the the last `ImportDecl` test case. Repository: rG LLVM Github

[PATCH] D44100: [ASTImporter] Reorder fields after structure import is finished

2019-07-23 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 211314. martong marked 5 inline comments as done. martong added a comment. - Address Alexei's comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D44100/new/ https://reviews.llvm.org/D44100 Files:

[PATCH] D64914: Implement P1771

2019-07-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D64914#1595660 , @erichkeane wrote: > Rebased and did all the comments (including the www_status). @aaron.ballman > : Wasn't positive what you meant about the conversion functions, but I think > I got one? I was

[PATCH] D59692: [ASTImporter] Fix name conflict handling

2019-07-23 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 211312. martong added a comment. - Rebase to master Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59692/new/ https://reviews.llvm.org/D59692 Files: clang/include/clang/AST/ASTImporter.h

[PATCH] D64241: [ASTImporter] Fix inequivalence of ClassTemplateInstantiations

2019-07-23 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366818: [ASTImporter] Fix inequivalence of ClassTemplateInstantiations (authored by martong, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

r366818 - [ASTImporter] Fix inequivalence of ClassTemplateInstantiations

2019-07-23 Thread Gabor Marton via cfe-commits
Author: martong Date: Tue Jul 23 08:46:38 2019 New Revision: 366818 URL: http://llvm.org/viewvc/llvm-project?rev=366818=rev Log: [ASTImporter] Fix inequivalence of ClassTemplateInstantiations Summary: We falsely state inequivalence if the template parameter is a qualified/nonquialified template

[PATCH] D65154: [clangd] Reformat use of cl::opt: use unqualified name and don't bin-pack attributes. NFC

2019-07-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: kadircet. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D65154 Files:

[PATCH] D64793: [Driver] Properly use values-X[ca].o, values-xpg[46].o on Solaris

2019-07-23 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. Is this really necessary? Users don't typically pass -std= to the driver for linking anyways (what do you even pass if you've compiled both C and C++ code?) so this seems a rather odd way to control behavior. How about instead just adding "values-xpg6.o"

[PATCH] D62829: [clang-tidy] Check for dynamically initialized statics in headers.

2019-07-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-dynamic-static-initializers.rst:9 + +This can pose problems in certain multithreaded contexts. Eugene.Zelenko wrote: > Will be good idea to provide example.

[PATCH] D63954: Add lifetime categories attributes

2019-07-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:4167 + +The attribute ``[[gsl::Owner(T)]]`` applies to structs and classes that own an +object of type ``T``: Do either of these attributes make sense on a union type? If so,

[PATCH] D64883: Add new warning -Walloca for use of builtin alloca function

2019-07-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:2776 +def warn_alloca : Warning< + "use of builtin function %0">, + InGroup>, DefaultIgnore; george.burgess.iv wrote: > aaron.ballman wrote: > > george.burgess.iv

[PATCH] D65153: [clangd] Also accept flags from CLANGD_FLAGS variable.

2019-07-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: kadircet. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. This simplifies various workflows, particularly in debugging/development. e.g. editors will tend to propagate

[PATCH] D64638: [CrossTU] Fix plist macro expansion if macro in other file.

2019-07-23 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Maybe CrossTU should not use the Frontend library? (Now the StaticAnalyzerCore is using CrossTU and CrossTU is using Frontend, in this way StaticAnalyzerCore could use Frontend too.) Repository: rC Clang CHANGES SINCE LAST ACTION

Re: r366694 - [NFC] Relaxed regression tests for PR42665

2019-07-23 Thread Hans Wennborg via cfe-commits
Merged them both in r366814. Thanks, Hans On Tue, Jul 23, 2019 at 7:20 AM Anastasia Stulova wrote: > > > + cfe-commits > > > From: Anastasia Stulova > Sent: 23 July 2019 15:16 > To: Hans Wennborg > Cc: Marco Antognini > Subject: Re: r366694 - [NFC] Relaxed

[PATCH] D63126: [clangd] Implement "prepareRename"

2019-07-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 211302. hokein marked 4 inline comments as done. hokein added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63126/new/ https://reviews.llvm.org/D63126 Files:

[PATCH] D60663: Time profiler: small fixes and optimizations

2019-07-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: llvm/trunk/lib/Support/TimeProfiler.cpp:27 +static cl::opt TimeTraceGranularity( +"time-trace-granularity", I know this is late, but... this shows up in the help for any tool that links in libSupport, many of

[PATCH] D65146: [clangd] Log version, cwd, args, and transport on startup. NFC

2019-07-23 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366811: [clangd] Log version, cwd, args, and transport on startup. NFC (authored by sammccall, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[clang-tools-extra] r366811 - [clangd] Log version, cwd, args, and transport on startup. NFC

2019-07-23 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Jul 23 07:30:28 2019 New Revision: 366811 URL: http://llvm.org/viewvc/llvm-project?rev=366811=rev Log: [clangd] Log version, cwd, args, and transport on startup. NFC Reviewers: hokein Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

[PATCH] D65064: [CrossTU] Add a function to retrieve original source location.

2019-07-23 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked an inline comment as done. balazske added inline comments. Comment at: clang/include/clang/CrossTU/CrossTranslationUnit.h:175 + /// returned. + llvm::Optional> + getImportedFromSourceLocation(const clang::SourceLocation ) const; It would be

[PATCH] D65149: [Format] Add test demonstrating PR42722

2019-07-23 Thread Brian Gesiak via Phabricator via cfe-commits
modocache created this revision. modocache added reviewers: ank, klimek, acoomans. Herald added a project: clang. https://bugs.llvm.org/show_bug.cgi?id=42722 describes what I believe to be a bug in lambda formatting. If it is indeed a bug, I'd like to commit this test that reliably reproduces it.

[PATCH] D63126: [clangd] Implement "prepareRename"

2019-07-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:393 ; + if (Params.capabilities.RenamePrepareSupport) +Result["renameProvider"] =

[PATCH] D65146: [clangd] Log version, cwd, args, and transport on startup. NFC

2019-07-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/tool/ClangdMain.cpp:436 + { +std::string LoggableArgs; +for (int I = 0; I < argc; ++I) this variable is

Re: r366694 - [NFC] Relaxed regression tests for PR42665

2019-07-23 Thread Anastasia Stulova via cfe-commits
+ cfe-commits From: Anastasia Stulova Sent: 23 July 2019 15:16 To: Hans Wennborg Cc: Marco Antognini Subject: Re: r366694 - [NFC] Relaxed regression tests for PR42665 @Hans, would it be possible to merge this commit along with r366670 to the release 9.0?

[PATCH] D64638: [CrossTU] Fix plist macro expansion if macro in other file.

2019-07-23 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. It is possible to use the `Preprocessor` instead of `ASTUnit` in `getImportedFromSourceLocation`. But this will contain less useful (even if currently not used) information. The test extension in D65064 is not possible to do if not

[PATCH] D65146: [clangd] Log version, cwd, args, and transport on startup. NFC

2019-07-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: hokein. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D65146 Files:

[PATCH] D61466: [Rewrite][NFC] Add FIXMEs and tests for RemoveLineIfEmpty bug

2019-07-23 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. Ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61466/new/ https://reviews.llvm.org/D61466 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D63126: [clangd] Implement "prepareRename"

2019-07-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:393 ; + if (Params.capabilities.RenamePrepareSupport) +Result["renameProvider"] = llvm::json::Object{{"prepareProvider", true}}; sammccall wrote: > why set

[PATCH] D64638: [CrossTU] Fix plist macro expansion if macro in other file.

2019-07-23 Thread Gabor Marton via Phabricator via cfe-commits
martong added a subscriber: NoQ. martong added a comment. In D64638#1593382 , @ilya-biryukov wrote: > `StaticAnalyzer/Core` does not depend on `clangFrontend` now, you can see > this by looking at `lib/StaticAnalyzer/Core/CMakeLists.txt`: > >

[PATCH] D63126: [clangd] Implement "prepareRename"

2019-07-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 211288. hokein marked 6 inline comments as done. hokein added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63126/new/ https://reviews.llvm.org/D63126 Files:

  1   2   >