[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2019-03-24 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D35068#1440830 , @koldaniel wrote: > In D35068#1438498 , @NoQ wrote: > > > There seems to be a crash in this code. @koldaniel, would you like to take > > a look?

[PATCH] D59756: [clangd] Support dependent bases in type hierarchy

2019-03-24 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. This patch aims to implement the more proper solution suggested here . I couldn't actually use `CXXRecordDecl->getTemplateInstantiationPattern()` as suggested, because the base-specifiers resolve to types, not

[PATCH] D59756: [clangd] Support dependent bases in type hierarchy

2019-03-24 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. Herald added a project: clang. Dependent bases are handled heuristically, by replacing them with the class template that they are a

[PATCH] D59743: [WebAssembly] Don't use default GetLinkerPath

2019-03-24 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang/lib/Driver/ToolChains/Fuchsia.h:89 - const char *getDefaultLinker() const override { -return "ld.lld"; - } + const char *getDefaultLinker()

[PATCH] D59752: Un-revert "[coroutines][PR40978] Emit error for co_yield within catch block"

2019-03-24 Thread Brian Gesiak via Phabricator via cfe-commits
modocache added a comment. Thank you for the review! Comment at: test/SemaCXX/exceptions.cpp:25 + int ref = k; +} int j = i; // expected-error {{use of undeclared identifier 'i'}} riccibruno wrote: > I am wondering if there is already a test

[PATCH] D59752: Un-revert "[coroutines][PR40978] Emit error for co_yield within catch block"

2019-03-24 Thread Brian Gesiak via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC356865: Un-revert [coroutines][PR40978] Emit error for co_yield within catch block (authored by modocache, committed by ). Changed prior to commit: https://reviews.llvm.org/D59752?vs=192045=192050#toc

r356865 - Un-revert "[coroutines][PR40978] Emit error for co_yield within catch block"

2019-03-24 Thread Brian Gesiak via cfe-commits
Author: modocache Date: Sun Mar 24 17:53:10 2019 New Revision: 356865 URL: http://llvm.org/viewvc/llvm-project?rev=356865=rev Log: Un-revert "[coroutines][PR40978] Emit error for co_yield within catch block" Summary: https://reviews.llvm.org/D59076 added a new coroutine error that prevented

[PATCH] D59754: [Sema] Add c++2a designated initializer warnings

2019-03-24 Thread Don Hinton via Phabricator via cfe-commits
hintonda updated this revision to Diff 192049. hintonda added a comment. - Fix variable typo/spellings, and add missing flag assignment and additional test to catch it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59754/new/

[PATCH] D59745: [NFC] Move writeFuncOrVarName out of class CodegenNameGenerator so that it can be reused more easily.

2019-03-24 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi abandoned this revision. plotfi added a comment. Found a better way to do what I needed without this unnecessary change. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59745/new/ https://reviews.llvm.org/D59745

[PATCH] D59754: [Sema] Add c++2a designated initializer warnings

2019-03-24 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:2002 bool HasDesignatedInit = false; + bool HasNonDesginatedInit = false; typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59754/new/

[PATCH] D59754: [Sema] Add c++2a designator initializer warnings

2019-03-24 Thread Don Hinton via Phabricator via cfe-commits
hintonda created this revision. hintonda added reviewers: rsmith, xbolva00. Herald added a project: clang. Basic designator initializers are allowed in c++2a, so only issue warnings for the extended ones that aren't allowed: - out of order - nested - arrays - mixed Repository: rG LLVM

[PATCH] D59752: Un-revert "[coroutines][PR40978] Emit error for co_yield within catch block"

2019-03-24 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno accepted this revision. riccibruno added a comment. This revision is now accepted and ready to land. Great! Since this already received one round of reviews I guess this looks okay. Comment at: test/SemaCXX/exceptions.cpp:25 + int ref = k; +} int j =

RE: [clang-tools-extra] r356849 - [pp-trace] Modernize the code

2019-03-24 Thread via cfe-commits
Hi Fangrui, This change is causing the PS4 Windows bot to fail to build: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/24560/steps/build/logs/stdio FAILED: tools/clang/tools/extra/pp-trace/CMakeFiles/pp-trace.dir/PPTrace.cpp.obj

[PATCH] D59752: Un-revert "[coroutines][PR40978] Emit error for co_yield within catch block"

2019-03-24 Thread Brian Gesiak via Phabricator via cfe-commits
modocache added inline comments. Comment at: lib/Parse/ParseStmt.cpp:2293 // FIXME: Possible draft standard bug: attribute-specifier should be allowed? StmtResult Block(ParseCompoundStatement()); if (Block.isInvalid()) riccibruno wrote: > Just to make

[PATCH] D59752: Un-revert "[coroutines][PR40978] Emit error for co_yield within catch block"

2019-03-24 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added inline comments. Comment at: lib/Parse/ParseStmt.cpp:2293 // FIXME: Possible draft standard bug: attribute-specifier should be allowed? StmtResult Block(ParseCompoundStatement()); if (Block.isInvalid()) Just to make sure I understood

[PATCH] D16761: clang-cl: Support loading plugins on Windows

2019-03-24 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. LLVM_EXPORT_REGISTRY no longer exists, so this can't be relanded. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D16761/new/ https://reviews.llvm.org/D16761 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D59750: Rename directory housing clang-include-fixer to be eponymous

2019-03-24 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. lg. Is the reference from libclang still around? Might need an update. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59750/new/ https://reviews.llvm.org/D59750

Re: r356862 - [X86] Make _bswap intrinsic a function instead of a macro to hopefully fix the chromium build.

2019-03-24 Thread Nico Weber via cfe-commits
Thanks, this helped. > to hopefully fix the chromium build. I'd argue it's overall more sane. Single underscore followed by lower-case letters isn't reserved in non-global scope, so what gcc is doing isn't quite proper from what I understand. On Sun, Mar 24, 2019 at 1:58 PM Craig Topper via

[PATCH] D59745: [NFC] Move writeFuncOrVarName out of class CodegenNameGenerator so that it can be reused more easily.

2019-03-24 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. Hmm, what exactly does the libclang interfaces not give you or what exactly did you intend to have this be used as. Perhaps with some more details we can find a good solution for the specific case that you have in mind. Repository: rC Clang CHANGES SINCE LAST

[PATCH] D59752: Un-revert "[coroutines][PR40978] Emit error for co_yield within catch block"

2019-03-24 Thread Brian Gesiak via Phabricator via cfe-commits
modocache created this revision. modocache added reviewers: GorNishanov, tks2103, rsmith. Herald added subscribers: jdoerfert, EricWF. Herald added a project: clang. https://reviews.llvm.org/D59076 added a new coroutine error that prevented users from using 'co_await' or 'co_yield' within a

[PATCH] D16761: clang-cl: Support loading plugins on Windows

2019-03-24 Thread NAKAMURA Takumi via Phabricator via cfe-commits
chapuni added a comment. @v.g.vassilev, I couldn't explain what it caused. Fell free to recommit. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D16761/new/ https://reviews.llvm.org/D16761 ___ cfe-commits mailing list

[PATCH] D16761: clang-cl: Support loading plugins on Windows

2019-03-24 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added subscribers: chapuni, v.g.vassilev. v.g.vassilev added a comment. @chapuni, you have reverted this patch and the commit message says "investigating". Did you come to a conclusion? Can we reland it? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D16761/new/

[PATCH] D59646: [PR40778][PR41157][OpenCL] Prevent implicit initialization of local address space objects

2019-03-24 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: lib/Sema/SemaDecl.cpp:11648-11651 +// In OpenCL we don't allow to initialize objects in local address space. +if (getLangOpts().OpenCL && +Var->getType().getAddressSpace() == LangAS::opencl_local) + return;

[PATCH] D55049: Changed every use of ASTImporter::Import to Import_New

2019-03-24 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin added a comment. Hi Balazs, The looks mostly good to me. Comment at: lib/AST/ASTImporter.cpp:3440 - for (const auto *Attr : D->attrs()) -ToIndirectField->addAttr(Importer.Import(Attr)); There is the same deletion in D53757.

[PATCH] D59408: [clang-format] [PR25010] Extend AllowShortIfStatementsOnASingleLine not working if an "else" statement is present

2019-03-24 Thread Ronald Wampler via Phabricator via cfe-commits
rdwampler added inline comments. Comment at: clang/include/clang/Format/Format.h:264 +/// If Else statements have no braces don't put them +/// on the same line. +/// \code These comments can be used to auto generate the corresponding sections in

[PATCH] D57978: [CodeGen] Generate follow-up metadata for loops with more than one transformation.

2019-03-24 Thread Dave Green via Phabricator via cfe-commits
dmgreen added a comment. Hello. I also don't feel very familiar with clang, but had a poke around and I think it looks pretty good. I see unroll and jam is being awkward again. This could maybe do with a few extra tests. Am I correct in saying something like this: #pragma unroll_and_jam(4)

Re: r356848 - [X86] Add BSR/BSF/BSWAP intrinsics to ia32intrin.h to match gcc.

2019-03-24 Thread Craig Topper via cfe-commits
Made a function in r356852 ~Craig On Sun, Mar 24, 2019 at 9:59 AM Nico Weber via cfe-commits < cfe-commits@lists.llvm.org> wrote: > This breaks Chromium's build. We have a class with a _bswap method, and > this adds a _bswap macro expanding to something that gets in the way. Could > _bswap be

r356862 - [X86] Make _bswap intrinsic a function instead of a macro to hopefully fix the chromium build.

2019-03-24 Thread Craig Topper via cfe-commits
Author: ctopper Date: Sun Mar 24 11:00:20 2019 New Revision: 356862 URL: http://llvm.org/viewvc/llvm-project?rev=356862=rev Log: [X86] Make _bswap intrinsic a function instead of a macro to hopefully fix the chromium build. This intrinsic was added in r356848 but was implemented as a macro to

[PATCH] D59750: Rename directory housing clang-include-fixer to be eponymous

2019-03-24 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. I accidentally hit some keyboard shortcut and created the revision before I was done adding reviewer and subscriber lists. Fixed now; apologies for the confusing email this will send. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59750/new/

[PATCH] D59298: [RISCV] Pass -target-abi to -cc1as

2019-03-24 Thread Alex Bradbury via Phabricator via cfe-commits
asb accepted this revision. asb added a comment. This revision is now accepted and ready to land. Herald added subscribers: benna, psnobl. Thanks, LGTM. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59298/new/ https://reviews.llvm.org/D59298

Re: r356848 - [X86] Add BSR/BSF/BSWAP intrinsics to ia32intrin.h to match gcc.

2019-03-24 Thread Nico Weber via cfe-commits
This breaks Chromium's build. We have a class with a _bswap method, and this adds a _bswap macro expanding to something that gets in the way. Could _bswap be an inline function instead? https://bugs.chromium.org/p/chromium/issues/detail?id=945172 On Sat, Mar 23, 2019 at 8:55 PM Craig Topper via

[PATCH] D53757: [ASTImporter] Changed use of Import to Import_New in ASTNodeImporter.

2019-03-24 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin accepted this revision. a_sidorin added a comment. This revision is now accepted and ready to land. Hi Balasz, Sorry, I missed the review accidentally. Thank you for the patch! Comment at: lib/AST/ASTImporter.cpp:3418 - for (const auto *Attr : D->attrs()) -

[PATCH] D59485: [ASTImporter] Add an ImportInternal method to allow customizing Import behavior.

2019-03-24 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin added a comment. Hello Raphael, Thank you for the explanation. I have +1 to Gabor's question to understand if this functionality can actually be added to the common ASTImporter. Comment at: clang/include/clang/AST/ASTImporter.h:149 +/// decl on its own. +

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

2019-03-24 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin added a comment. Hi Gabor, Thank you for addressing the problem! Comment at: lib/AST/ASTImporter.cpp:2256 return Importer.MapImported(D, FoundTypedef); -} -// FIXME Handle redecl chain. -break; +} else +

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2019-03-24 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added a comment. In D35068#1438498 , @NoQ wrote: > There seems to be a crash in this code. @koldaniel, would you like to take a > look? https://bugs.llvm.org/show_bug.cgi?id=41185 Hi, True, it is a faulty scenario, my question is what should

[PATCH] D59746: [LibTooling] Fix '-h' option

2019-03-24 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a comment. A better alternative would have been to add a cl::aliasopt for '-h' in llvm's CommandLineParser when '-help' was first added. However, that's no longer possible since some llvm based tools already use '-h' for other purposes. Repository: rG LLVM Github Monorepo

[PATCH] D59746: [LibTooling] Fix '-h' option

2019-03-24 Thread Don Hinton via Phabricator via cfe-commits
hintonda created this revision. hintonda added a reviewer: alexfh. Herald added a project: clang. LibTooling's '-h' option was intended to be as an alias for '-help', but since the '-help' option is declared as a function scoped static, it isn't visible, leaving it to individual clients to handle

[clang-tools-extra] r356851 - [pp-trace] Delete redundant clang::

2019-03-24 Thread Fangrui Song via cfe-commits
Author: maskray Date: Sun Mar 24 00:31:21 2019 New Revision: 356851 URL: http://llvm.org/viewvc/llvm-project?rev=356851=rev Log: [pp-trace] Delete redundant clang:: And clarify command line options Modified: clang-tools-extra/trunk/docs/pp-trace.rst

[clang-tools-extra] r356850 - [pp-trace] Wrap code in clang::pp_trace

2019-03-24 Thread Fangrui Song via cfe-commits
Author: maskray Date: Sun Mar 24 00:21:32 2019 New Revision: 356850 URL: http://llvm.org/viewvc/llvm-project?rev=356850=rev Log: [pp-trace] Wrap code in clang::pp_trace Modified: clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.cpp clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.h

[clang-tools-extra] r356849 - [pp-trace] Modernize the code

2019-03-24 Thread Fangrui Song via cfe-commits
Author: maskray Date: Sat Mar 23 23:55:08 2019 New Revision: 356849 URL: http://llvm.org/viewvc/llvm-project?rev=356849=rev Log: [pp-trace] Modernize the code Use InitLLVM and WithColor Delete PPTraceConsumer, add the callback in PPTraceAction Migrae to tooling::createExecutorFromCommandLineArgs

[PATCH] D59745: [NFC] Move writeFuncOrVarName out of class CodegenNameGenerator so that it can be reused more easily.

2019-03-24 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi created this revision. plotfi added reviewers: compnerd, akyrtzi. Herald added subscribers: cfe-commits, jdoerfert, arphaman. Herald added a project: clang. I simply want a helper function to use for printing out mangled Decl names. I think this could be a pretty simple straightforward