r373161 - For now, disallow lifetime-extended temporaries with non-trivial (but

2019-09-28 Thread Richard Smith via cfe-commits
Author: rsmith Date: Sat Sep 28 23:22:54 2019 New Revision: 373161 URL: http://llvm.org/viewvc/llvm-project?rev=373161&view=rev Log: For now, disallow lifetime-extended temporaries with non-trivial (but constexpr) destructors from being used in the values of constexpr variables. The standard rule

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&view=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&view=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 con

[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&R 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 clang/tools/c-index-t

[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 into

[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 t

[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: https://bugs.chromium.o

[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: test/SemaCXX/warn-custom-cop

[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 th

[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 `TokenAnnotator::spaceRequir

[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: clang-tools-extra/clangd/refactor/tweaks/ExtractFun

[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}, &MallocChecker::checkAlloca}, + {{"_alloca", 1}, &MallocChecker::checkAlloca}, + {{"malloc", 1}, &MallocCh

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&view=rev Log: SemaExpr - silence static analyzer getAs<> null dereference warnings. NFCI. The static analyzer is warning about potential null dereferences, but in these cases w

[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: Don't install example analyzer plugins (authored by aaronpuchert, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.

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&view=rev Log: Don't install example analyzer plugins Summary: Fixes PR43430. Reviewers: hintonda, NoQ, Szelethus, lebedev.ri Reviewed By: lebedev.ri Differential Revisio

[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 of

[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/ https:

[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 Mon

[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 `add_llvm_li

[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 prio

[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 +} + // L

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&view=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, so

[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 thi

[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 &C, const CallExpr *CE, + Pro

[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 inf

[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: cla

[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 &CD) const; NoQ wrote: > I don't fully understan

[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() != Decl::Fun

[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 c

[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 clang/test/CodeGenCXX/dbg-info-all-calls-described.cp

[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&view=rev Log: [TimeProfiler] Fix "OptModule" section and add new "Backend" sections Remove unnecessary "OptModule" section. Add "PerFunctionPasses", "PerModulePasses" an

[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 function