r373160 - Fix checking for permitted results of constant expressions.

2019-09-28 Thread Richard Smith via cfe-commits
Author: rsmith Date: Sat Sep 28 22:58:31 2019 New Revision: 373160 URL: http://llvm.org/viewvc/llvm-project?rev=373160=rev Log: Fix checking for permitted results of constant expressions. In the presence of mutable state, we need to check whether temporaries involved in a constant expression

r373159 - For P0784R7: compute whether a variable has constant destruction if it

2019-09-28 Thread Richard Smith via cfe-commits
Author: rsmith Date: Sat Sep 28 22:08:46 2019 New Revision: 373159 URL: http://llvm.org/viewvc/llvm-project?rev=373159=rev Log: For P0784R7: compute whether a variable has constant destruction if it has a constexpr destructor. For constexpr variables, reject if the variable does not have

[PATCH] D68187: [libclang] Use strict prototypes in header

2019-09-28 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. Can be "reproduced" with `clang -fsyntax-only -Wstrict-prototypes clang/include/clang-c/*.h`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68187/new/ https://reviews.llvm.org/D68187

[PATCH] D68187: [libclang] Use strict prototypes in header

2019-09-28 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert created this revision. aaronpuchert added reviewers: aaron.ballman, arphaman, ddunbar, jkorous. Herald added subscribers: cfe-commits, dexonsmith. Herald added a project: clang. When included in a C program, these function declarations are treated as K declarations, which conveys no

[PATCH] D67321: Respect CLANG_LINK_CLANG_DYLIB=ON in libclang and c-index-test

2019-09-28 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert updated this revision to Diff 222303. aaronpuchert added a comment. Fix typo. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67321/new/ https://reviews.llvm.org/D67321 Files: clang/cmake/modules/AddClang.cmake

[PATCH] D67321: Respect CLANG_LINK_CLANG_DYLIB=ON in libclang and c-index-test

2019-09-28 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert updated this revision to Diff 222302. aaronpuchert marked 4 inline comments as done. aaronpuchert added a comment. Handle static libraries correctly. Dependencies of executables are obviously always PRIVATE, but for library targets we have to turn PRIVATE or PUBLIC dependencies

[PATCH] D68185: [Diagnostics] Warn when class implements a copy constructor/copy assignment operator, but missing the copy assignment operator/copy constructor

2019-09-28 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> if I provide a destructor but implicitly default my copy operations, isn't >> that just as bad, Rule-of-Three-wise? Yeah, I am wondering about this too. whether we should check the whole Rule-of-Three. Suggestions from other reviewers? CHANGES SINCE LAST ACTION

[PATCH] D68185: [Diagnostics] Warn when class implements a copy constructor/copy assignment operator, but missing the copy assignment operator/copy constructor

2019-09-28 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. Please add test cases showing the intended behavior for - when the copy constructor is explicitly defaulted but the copy assignment operator is {implicitly defaulted, implicitly deleted, user-provided} - when the copy assignment operator is explicitly defaulted but

[PATCH] D68185: [Diagnostics] Warn when class implements a copy constructor/copy assignment operator, but missing the copy assignment operator/copy constructor

2019-09-28 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 created this revision. xbolva00 added a reviewer: rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. xbolva00 updated this revision to Diff 222301. Clang version of https://www.viva64.com/en/w/v690/ Also requested by Chromium developers:

[PATCH] D68185: [Diagnostics] Warn when class implements a copy constructor/copy assignment operator, but missing the copy assignment operator/copy constructor

2019-09-28 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 222301. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68185/new/ https://reviews.llvm.org/D68185 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDeclCXX.cpp test/SemaCXX/warn-custom-copy.cpp Index:

[PATCH] D68072: [clang-format] Reference qualifiers in member templates causing extra indentation.

2019-09-28 Thread Andreas Wass via Phabricator via cfe-commits
AndWass marked 4 inline comments as done. AndWass added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:1375 +} + // Line.MightBeFunctionDecl can only be true after the parentheses of a MyDeveloperDay wrote: > could this be done using

[PATCH] D68072: [clang-format] Reference qualifiers in member templates causing extra indentation.

2019-09-28 Thread Andreas Wass via Phabricator via cfe-commits
AndWass updated this revision to Diff 99. AndWass added a comment. Removed the manual paranthesis-tracking, using NestingLevel instead. Moved tests to the already existing `UnderstandsFunctionRefQualification` test case. Clarified what is being matched against in

[PATCH] D67877: [analyzer] Conditionnaly include clang Analysis examples with cmake.

2019-09-28 Thread Jean-Bapiste Lepesme via Phabricator via cfe-commits
Jiboo abandoned this revision. Jiboo added a comment. Superseded by D68172 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67877/new/ https://reviews.llvm.org/D67877

[PATCH] D68182: [Clangd] Ensure children are always RootStmt in ExtractFunction (Fixes #153)

2019-09-28 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah updated this revision to Diff 93. SureYeaah added a comment. Added llmv_unreachable Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68182/new/ https://reviews.llvm.org/D68182 Files:

[PATCH] D68182: [Clangd] Ensure children are always RootStmt in ExtractFunction (Fixes #153)

2019-09-28 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah created this revision. SureYeaah added reviewers: sammccall, kadircet. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov, kristof.beyls. Herald added a project: clang. SureYeaah edited the summary of this revision. We weren't always checking if

[PATCH] D68165: [analyzer][MallocChecker][NFC] Split checkPostCall up, deploy CallDescriptionMap

2019-09-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:397-398 + CallDescriptionMap NonFreeingMemFnMap{ + {{"alloca", 1}, ::checkAlloca}, + {{"_alloca", 1}, ::checkAlloca}, + {{"malloc", 1}, ::checkMalloc},

r373150 - SemaExpr - silence static analyzer getAs<> null dereference warnings. NFCI.

2019-09-28 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Sat Sep 28 07:01:52 2019 New Revision: 373150 URL: http://llvm.org/viewvc/llvm-project?rev=373150=rev Log: SemaExpr - silence static analyzer getAs<> null dereference warnings. NFCI. The static analyzer is warning about potential null dereferences, but in these cases we

[PATCH] D68172: Don't install example analyzer plugins

2019-09-28 Thread Aaron Puchert via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373148: Dont install example analyzer plugins (authored by aaronpuchert, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

r373148 - Don't install example analyzer plugins

2019-09-28 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Sat Sep 28 06:28:50 2019 New Revision: 373148 URL: http://llvm.org/viewvc/llvm-project?rev=373148=rev Log: Don't install example analyzer plugins Summary: Fixes PR43430. Reviewers: hintonda, NoQ, Szelethus, lebedev.ri Reviewed By: lebedev.ri Differential Revision:

[PATCH] D67877: [analyzer] Conditionnaly include clang Analysis examples with cmake.

2019-09-28 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. In D67877#1686961 , @Jiboo wrote: > @Szelethus could you confirm that thus examples shouldn't be built when > CLANG_BUILD_EXAMPLES is OFF, and that this patch is still valid? The problem is that `CLANG_BUILD_EXAMPLES` is

[PATCH] D66872: [clangd] SelectionTree should mark a node as fully-selected if the only claimed tokens were early-claimed.

2019-09-28 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah accepted this revision. SureYeaah added a comment. This revision is now accepted and ready to land. Herald added a subscriber: usaxena95. Sorry about the delay. LGTM. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66872/new/

[PATCH] D68172: Don't install example analyzer plugins

2019-09-28 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri accepted this revision. lebedev.ri added a comment. This revision is now accepted and ready to land. I feel like i can stamp this. There's similar-isn problem with lit-cpuid which is referenced in LLVMExports.cmake but is packaged in debian in lldb... Repository: rG LLVM Github

[PATCH] D68172: Don't install example analyzer plugins

2019-09-28 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. In D68172#1686960 , @Szelethus wrote: > The patch looks alright, I won't formally accept because if I knew how these > worked, it wouldn't have caused so much pain to so many people :) If it helps, this is from

[PATCH] D66834: Driver tests: set `--sysroot=""` to support clang with `DEFAULT_SYSROOT`

2019-09-28 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373147: Driver tests: set `--sysroot=` to support clang with `DEFAULT_SYSROOT` (authored by sepavloff, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior

[PATCH] D68072: Reference qualifiers in member templates causing extra indentation.

2019-09-28 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. As the number of clauses is vast, I think sometimes its worth just putting a one-line comment in to explain what construct you are matching, just to help future maintainers Comment at: clang/lib/Format/TokenAnnotator.cpp:1375 +} + //

r373147 - Driver tests: set `--sysroot=""` to support clang with `DEFAULT_SYSROOT`

2019-09-28 Thread Serge Pavlov via cfe-commits
Author: sepavloff Date: Sat Sep 28 05:21:06 2019 New Revision: 373147 URL: http://llvm.org/viewvc/llvm-project?rev=373147=rev Log: Driver tests: set `--sysroot=""` to support clang with `DEFAULT_SYSROOT` When testing clang that has been compiled with `-DDEFAULT_SYSROOT` set to some path, some

[PATCH] D67877: [analyzer] Conditionnaly include clang Analysis examples with cmake.

2019-09-28 Thread Jean-Bapiste Lepesme via Phabricator via cfe-commits
Jiboo added a comment. @aaronpuchert thanks, that looks like a better fix than mine for PR43430, although I'm not sure D68172 obsoletes this patch. @Szelethus could you confirm that thus examples shouldn't be built when CLANG_BUILD_EXAMPLES is OFF, and that

[PATCH] D68172: Don't install example analyzer plugins

2019-09-28 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. The patch looks alright, I won't formally accept because if I knew how these worked, it wouldn't have caused so much pain to so many people :) In D68172#1686793 , @aaronpuchert wrote: > In D68172#1686772

[PATCH] D68165: [analyzer][MallocChecker][NFC] Split checkPostCall up, deploy CallDescriptionMap

2019-09-28 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked 2 inline comments as done. Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:378-379 + + using CheckFn = void (MallocChecker::*)(CheckerContext , const CallExpr *CE, +

[PATCH] D67877: [analyzer] Conditionnaly include clang Analysis examples with cmake.

2019-09-28 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. I didn't know about this patch and published D68172 : adding `BUILDTREE_ONLY` still builds the examples, but doesn't install them. It's also used by other test plugins like `llvm/lib/Transforms/Hello`. Thanks to @lebedev.ri for

[PATCH] D68072: Reference qualifiers in member templates causing extra indentation.

2019-09-28 Thread Andreas Wass via Phabricator via cfe-commits
AndWass updated this revision to Diff 87. AndWass added a comment. Updated to fix test failures. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68072/new/ https://reviews.llvm.org/D68072 Files: clang/lib/Format/TokenAnnotator.cpp clang/unittests/Format/FormatTest.cpp Index:

[PATCH] D68163: [analyzer][MallocChecker][NFC] Change the use of IdentifierInfo* to CallDescription

2019-09-28 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked 2 inline comments as done. Szelethus added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:259 /// calls. bool isCalled(const CallDescription ) const; NoQ wrote: > I don't fully understand

[PATCH] D68163: [analyzer][MallocChecker][NFC] Change the use of IdentifierInfo* to CallDescription

2019-09-28 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1006 const FunctionDecl *FD = C.getCalleeDecl(CE); - if (!FD) + if (!FD || FD->getKind() != Decl::Function) return; NoQ wrote: > The `FD->getKind() !=

[PATCH] D68172: Don't install example analyzer plugins

2019-09-28 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. There's also D67877 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68172/new/ https://reviews.llvm.org/D68172 ___ cfe-commits mailing list

[PATCH] D68117: [DWARF-5] Support for C++11 defaulted, deleted member functions.

2019-09-28 Thread Sourabh Singh Tomar via Phabricator via cfe-commits
SouraVX updated this revision to Diff 86. SouraVX added a comment. Minor refactor for context. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68117/new/ https://reviews.llvm.org/D68117 Files: clang/lib/CodeGen/CGDebugInfo.cpp

[PATCH] D68117: [DWARF-5] Support for C++11 defaulted, deleted member functions.

2019-09-28 Thread Sourabh Singh Tomar via Phabricator via cfe-commits
SouraVX marked 2 inline comments as done. SouraVX added a comment. In D68117#1686235 , @aprantl wrote: > This needs a lot more test coverage: The frontend cases aren't all covered by > frontend checks and neither is the dwarf output. Do you mean to add

r373142 - [TimeProfiler] Fix "OptModule" section and add new "Backend" sections

2019-09-28 Thread Anton Afanasyev via cfe-commits
Author: anton-afanasyev Date: Sat Sep 28 00:14:12 2019 New Revision: 373142 URL: http://llvm.org/viewvc/llvm-project?rev=373142=rev Log: [TimeProfiler] Fix "OptModule" section and add new "Backend" sections Remove unnecessary "OptModule" section. Add "PerFunctionPasses", "PerModulePasses" and

[PATCH] D68108: Redeclare Objective-C property accessors inside the ObjCImplDecl in which they are synthesized.

2019-09-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Also, I think it would be good if there was a more explicit method for asking whether a method is a synthesized definition. Basically, there's a tri-state: there are pure declarations, user-provided definitions, and synthetic definitions. IRGen should emit a

[PATCH] D68108: Redeclare Objective-C property accessors inside the ObjCImplDecl in which they are synthesized.

2019-09-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/include/clang/AST/DeclObjC.h:2787 + /// interface as a decl context. + ObjCMethodDecl *SetterMethodDecl = nullptr; + Are these comments right? The DC is the implementation's interface? Regardless, I think

[PATCH] D68161: [TimeProfiler] Fix "OptModule" section and add new "Backend" sections

2019-09-28 Thread Anton Afanasyev via Phabricator via cfe-commits
anton-afanasyev added a comment. In D68161#1686632 , @lebedev.ri wrote: > Oh nice! > F10096481: image.png > F10096488: image.png > I like this. > > One more related question -

[PATCH] D67592: [Clang] Use -main-file-name for source filename if not set

2019-09-28 Thread Joel Klinghed via Phabricator via cfe-commits
the_jk added a comment. I don't have commit access so I'd need someone to push this, thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67592/new/ https://reviews.llvm.org/D67592 ___ cfe-commits mailing list cfe-commits@lists.llvm.org