[PATCH] D66662: [clang-format] [PR43100] clang-format C# support does not add a space between "using" and paren

2019-08-24 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. The test case fails after the missing `)` is added, so it seems that the patch has no effect. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D2/new/ https://reviews.llvm.org/D2 ___

[PATCH] D66711: [clang] Warning for non-final classes with final destructors

2019-08-24 Thread Logan Smith via Phabricator via cfe-commits
logan-5 created this revision. logan-5 added reviewers: rsmith, yamauchi. logan-5 added a project: clang. Herald added a subscriber: cfe-commits. Marking a class' destructor `final` prevents the class from being inherited from. However, it is a subtle and awkward way to express that at best, and

[PATCH] D66710: ASTReader: Bypass overridden files when reading PCHs

2019-08-24 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: rsmith, arphaman, akyrtzi, bruno. Herald added a subscriber: ributzka. If contents of a file that is part of a PCM are overridden when reading it, but weren't overridden when the PCM was being built, the ASTReader will emit an error.

r369861 - FileManager: Factor duplicated code in getBufferForFile, NFC

2019-08-24 Thread Duncan P. N. Exon Smith via cfe-commits
Author: dexonsmith Date: Sat Aug 24 18:18:35 2019 New Revision: 369861 URL: http://llvm.org/viewvc/llvm-project?rev=369861=rev Log: FileManager: Factor duplicated code in getBufferForFile, NFC Incidentally, this also unifies the two versions (removing an unnecessary call to

[PATCH] D66705: FileManager: Use llvm::Expected in new getFileRef API

2019-08-24 Thread Lang Hames via Phabricator via cfe-commits
lhames added a comment. In D66705#1644166 , @dexonsmith wrote: > Updated patch after running `check-clang` and learning more about `Expected`. > I've added a parallel API using `Optional` for clients that > don't want to do anything with the error. > >

[PATCH] D66705: FileManager: Use llvm::Expected in new getFileRef API

2019-08-24 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 217026. dexonsmith edited the summary of this revision. dexonsmith added a comment. Fix the change to CompilerInstance.cpp. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66705/new/ https://reviews.llvm.org/D66705 Files:

[PATCH] D66705: FileManager: Use llvm::Expected in new getFileRef API

2019-08-24 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 217025. dexonsmith marked an inline comment as done. dexonsmith edited the summary of this revision. dexonsmith added a comment. Also update `FileEntryRef` to be copy- and move-assignable so that `Optional` can be assigned to. CHANGES SINCE LAST ACTION

[PATCH] D66700: [Wdocumentation] improve wording of a warning message

2019-08-24 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66700/new/ https://reviews.llvm.org/D66700 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D66705: FileManager: Use llvm::Expected in new getFileRef API

2019-08-24 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith marked 2 inline comments as done. dexonsmith added inline comments. Comment at: clang/lib/Lex/HeaderSearch.cpp:1079 if (!File) { // Check ".../Frameworks/HIToolbox.framework/PrivateHeaders/HIToolbox.h" HeadersFilename = FrameworkName;

[PATCH] D66705: FileManager: Use llvm::Expected in new getFileRef API

2019-08-24 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 217024. dexonsmith edited the summary of this revision. dexonsmith added a subscriber: lhames. dexonsmith added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Updated patch after running `check-clang` and learning more

[PATCH] D66700: [Wdocumentation] improve wording of a warning message

2019-08-24 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added a comment. I will commit on Monday. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66700/new/ https://reviews.llvm.org/D66700 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D66511: [clang-scan-deps] Skip UTF-8 BOM in source minimizer

2019-08-24 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea marked an inline comment as done. aganea added inline comments. Comment at: lib/Lex/DependencyDirectivesSourceMinimizer.cpp:822 bool Minimizer::minimizeImpl(const char *First, const char *const End) { + skipUTF8ByteOrderMark(First, End); while (First != End)

[PATCH] D66700: [Wdocumentation] improve wording of a warning message

2019-08-24 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. You're welcome @davezarzycki. Can one of you commit the patch? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66700/new/ https://reviews.llvm.org/D66700 ___ cfe-commits

[PATCH] D66706: [Wdocumentation] fixes an assertion failure with typedefed function and block pointer

2019-08-24 Thread Mark de Wever via Phabricator via cfe-commits
Mordante created this revision. Mordante added a reviewer: gribozavr. Mordante added a project: clang. The assertion happens when compiling with -Wdocumentation with variable declaration to a typedefed function pointer. I not too familiar with the ObjC syntax but first two tests assert without

[clang-tools-extra] r369853 - [clang-tidy] Manually enable exceptions in tesst that uses them

2019-08-24 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Sat Aug 24 10:19:06 2019 New Revision: 369853 URL: http://llvm.org/viewvc/llvm-project?rev=369853=rev Log: [clang-tidy] Manually enable exceptions in tesst that uses them Modified: clang-tools-extra/trunk/test/clang-tidy/duplicate-reports.cpp Modified:

[PATCH] D66336: [ASTImporter] Add development internals docs

2019-08-24 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin added inline comments. Comment at: clang/docs/InternalsManual.rst:1470 +*templated* class (the ``CXXRecordDecl``) of a ``ClassTemplateDecl`` with +``ClassTemplateDecl::getTemplatedDec()``. And we can get back a pointer of the +"described" class template from the

[PATCH] D66705: FileManager: Use llvm::Expected in new getFileRef API

2019-08-24 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: clang/lib/Lex/HeaderSearch.cpp:1079 if (!File) { // Check ".../Frameworks/HIToolbox.framework/PrivateHeaders/HIToolbox.h" HeadersFilename = FrameworkName; It should be fine to update the return type, but I

[PATCH] D66705: FileManager: Use llvm::Expected in new getFileRef API

2019-08-24 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. @arphaman, is there a reason you think `ErrorOr` is more appropriate long-term here? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66705/new/ https://reviews.llvm.org/D66705 ___ cfe-commits mailing list

[PATCH] D66705: FileManager: Use llvm::Expected in new getFileRef API

2019-08-24 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added a reviewer: arphaman. Herald added a subscriber: ributzka. dexonsmith added a comment. @arphaman, is there a reason you think `ErrorOr` is more appropriate long-term here? `FileManager::getFileRef` is a modern API which we expect to convert to

[PATCH] D64671: [clang-tidy] New check: misc-init-local-variables

2019-08-24 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tools-extra/test/clang-tidy/cppcoreguidelines-init-variables.cpp:3 + +#include + aaron.ballman wrote: > Eugene.Zelenko wrote: > > lebedev.ri wrote: > > > Eugene.Zelenko wrote: > > > > It'll be better to

[PATCH] D64671: [clang-tidy] New check: misc-init-local-variables

2019-08-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/test/clang-tidy/cppcoreguidelines-init-variables.cpp:3 + +#include + Eugene.Zelenko wrote: > lebedev.ri wrote: > > Eugene.Zelenko wrote: > > > It'll be better to include cstdint. > > I'll

[PATCH] D64671: [clang-tidy] New check: misc-init-local-variables

2019-08-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/test/clang-tidy/cppcoreguidelines-init-variables.cpp:3 + +#include + lebedev.ri wrote: > Eugene.Zelenko wrote: > > It'll be better to include cstdint. > I'll correct that comment: tests

[PATCH] D64671: [clang-tidy] New check: misc-init-local-variables

2019-08-24 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tools-extra/test/clang-tidy/cppcoreguidelines-init-variables.cpp:3 + +#include + Eugene.Zelenko wrote: > It'll be better to include cstdint. I'll correct that comment: tests normally shouldn't depend on

[PATCH] D64671: [clang-tidy] New check: misc-init-local-variables

2019-08-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/test/clang-tidy/cppcoreguidelines-init-variables.cpp:3 + +#include + It'll be better to include cstdint. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64671/new/

r369846 - [OpenCL] Microoptimize OCL2Qual a bit

2019-08-24 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Sat Aug 24 06:04:34 2019 New Revision: 369846 URL: http://llvm.org/viewvc/llvm-project?rev=369846=rev Log: [OpenCL] Microoptimize OCL2Qual a bit Still not optimal, but makes clang 25k smaller. Modified: cfe/trunk/lib/Sema/SemaLookup.cpp

r369845 - [analyzer] Analysis: Fix checker silencing

2019-08-24 Thread Csaba Dabis via cfe-commits
Author: charusso Date: Sat Aug 24 05:17:49 2019 New Revision: 369845 URL: http://llvm.org/viewvc/llvm-project?rev=369845=rev Log: [analyzer] Analysis: Fix checker silencing Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp cfe/trunk/tools/scan-build/bin/scan-build Modified:

[PATCH] D66700: [Wdocumentation] improve wording of a warning message

2019-08-24 Thread David Zarzycki via Phabricator via cfe-commits
davezarzycki added a comment. Works for me. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66700/new/ https://reviews.llvm.org/D66700 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D64671: [clang-tidy] New check: misc-init-local-variables

2019-08-24 Thread Jussi Pakkanen via Phabricator via cfe-commits
jpakkane added a comment. Herald added a subscriber: wuzish. Does this still need work? FWICT all issues raised have been fixed. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64671/new/ https://reviews.llvm.org/D64671 ___ cfe-commits

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

2019-08-24 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. I created D66700 with an improved warning message. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64696/new/ https://reviews.llvm.org/D64696 ___ cfe-commits

[PATCH] D66700: [Wdocumentation] improve wording of a warning message

2019-08-24 Thread Mark de Wever via Phabricator via cfe-commits
Mordante created this revision. Mordante added reviewers: gribozavr, davezarzycki. Mordante added a project: clang. Based on @davezarzycki remarks in D64696 improved the wording of the warning message. (Note I don't have commit access) Repository: rG LLVM

[PATCH] D66067: Push lambda scope earlier when transforming lambda expression

2019-08-24 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a reviewer: aaron.ballman. lebedev.ri added inline comments. Comment at: clang/test/SemaTemplate/default-arguments-cxx0x.cpp:1 -// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s +// RUN: %clang_cc1 -fsyntax-only -std=c++14 -verify %s //

[PATCH] D66067: Push lambda scope earlier when transforming lambda expression

2019-08-24 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added inline comments. Comment at: clang/test/SemaTemplate/default-arguments-cxx0x.cpp:1 -// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s +// RUN: %clang_cc1 -fsyntax-only -std=c++14 -verify %s // expected-no-diagnostics comex wrote: > Mordante

Re: r369830 - NFC: Rename some sanitizer related lifetime checks

2019-08-24 Thread David Zarzycki via cfe-commits
Fix: r369843 Please confirm. Thanks! > On Aug 24, 2019, at 8:18 AM, David Zarzycki wrote: > > This seems to have broken building on Red Hat Fedora Linux 30 (x86_64). Was > this expected? > > FAIL: Clang :: CodeGenCXX/lifetime-sanitizer.cpp (7750 of 50751) > TEST 'Clang

r369843 - [Testing] Unbreak r369830

2019-08-24 Thread David Zarzycki via cfe-commits
Author: davezarzycki Date: Sat Aug 24 01:12:51 2019 New Revision: 369843 URL: http://llvm.org/viewvc/llvm-project?rev=369843=rev Log: [Testing] Unbreak r369830 Modified: cfe/trunk/test/CodeGenCXX/lifetime-sanitizer.cpp Modified: cfe/trunk/test/CodeGenCXX/lifetime-sanitizer.cpp URL:

[PATCH] D66686: [LifetimeAnalysis] Make it possible to disable the new warnings

2019-08-24 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:6651 visitLocalsRetainedByReferenceBinding(Path, Arg, RK_ReferenceBinding, -Visit); +Visit, true); else

[PATCH] D66662: [clang-format] [PR43100] clang-format C# support does not add a space between "using" and paren

2019-08-24 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/unittests/Format/FormatTestCSharp.cpp:169 +TEST_F(FormatTestCSharp, CSharpUsing) { + verifyFormat("using (StreamWriter sw = new StreamWriter(filename) { }"); +} owenpan wrote: > owenpan wrote: > > Maybe set

Re: r369830 - NFC: Rename some sanitizer related lifetime checks

2019-08-24 Thread David Zarzycki via cfe-commits
This seems to have broken building on Red Hat Fedora Linux 30 (x86_64). Was this expected? FAIL: Clang :: CodeGenCXX/lifetime-sanitizer.cpp (7750 of 50751) TEST 'Clang :: CodeGenCXX/lifetime-sanitizer.cpp' FAILED Script: -- : 'RUN: at line 1';

[PATCH] D66695: msan, codegen, instcombine: Keep more lifetime markers used for msan

2019-08-24 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: llvm/test/Transforms/InstCombine/lifetime-sanitizer.ll:37-50 +define void @msan() sanitize_memory { +entry: + ; CHECK-LABEL: @msan( + %text = alloca i8, align 1 + + call void @llvm.lifetime.start.p0i8(i64 1, i8* %text) + call