[PATCH] D54295: [WIP, RISCV] Add inline asm constraint A for RISC-V

2018-11-09 Thread Lewis Revill via Phabricator via cfe-commits
lewis-revill created this revision. lewis-revill added a reviewer: asb. Herald added subscribers: cfe-commits, jocewei, PkmX, rkruppe, the_o, brucehoult, MartinMosbeck, rogfer01, mgrang, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, apazos, simoncook, johnrusso, rbar, er

[PATCH] D54269: Introduce shard storage to auto-index.

2018-11-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 173281. kadircet marked an inline comment as done. kadircet added a comment. - clang-format Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54269 Files: clangd/index/Background.cpp clangd/index/Background.h unittests/clangd/Background

[PATCH] D52296: [Clang] - Add -fdwarf-fission=split,single option.

2018-11-09 Thread George Rimar via Phabricator via cfe-commits
grimar added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:5889 const llvm::Triple &T = getToolChain().getTriple(); - if (Args.hasArg(options::OPT_gsplit_dwarf) && + if ((getDebugFissionKind(D, Args) == DwarfFissionKind::Split) && (T.isOSLinux() || T.is

[PATCH] D52296: [Clang] - Add -fdwarf-fission=split,single option.

2018-11-09 Thread George Rimar via Phabricator via cfe-commits
grimar added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:5889 const llvm::Triple &T = getToolChain().getTriple(); - if (Args.hasArg(options::OPT_gsplit_dwarf) && + if ((getDebugFissionKind(D, Args) == DwarfFissionKind::Split) && (T.isOSLinux() || T.is

[PATCH] D54298: [clang-cl] Add warning for /Zc:dllexportInlines- when the flag is used with /fallback

2018-11-09 Thread Hans Wennborg via Phabricator via cfe-commits
hans added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:5507 CmdArgs.push_back("-fno-dllexport-inlines"); +if (Args.hasArg(options::OPT__SLASH_fallback)) { + const Arg *dllexportInlines = I think the check should be with the co

[PATCH] D54300: [clangd] Respect shouldIndexFile when collecting symbols.

2018-11-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ioeric. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54300 Files: clangd/index/SymbolCollector.cpp clangd/index/SymbolCollector.h unittest

[PATCH] D52296: [Clang] - Add -fdwarf-fission=split,single option.

2018-11-09 Thread George Rimar via Phabricator via cfe-commits
grimar added a comment. Looks like this behavior is what clang already have atm. Messages for the options that use `D.Diag` to report invalid values can be printed multiple times sometimes. The example is below: clang main.cpp -fdwarf-fission=foo -o 1.o -mthread-model bar -fcf-runtime-abi=z

[PATCH] D54246: [clang-tidy] Add the abseil-duration-factory-scale check

2018-11-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tidy/abseil/DurationFactoryScaleCheck.cpp:36 +GetScaleForFactory(llvm::StringRef FactoryName) { + static const auto *ScaleMap = + new std::unordered_map( aaron.ballman wrote: > hwright wrote: > > Eugene.Zelenk

r346485 - [Tooling] Avoid diagnosing missing input files in an edge-case where it's incorrect.

2018-11-09 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Nov 9 03:49:22 2018 New Revision: 346485 URL: http://llvm.org/viewvc/llvm-project?rev=346485&view=rev Log: [Tooling] Avoid diagnosing missing input files in an edge-case where it's incorrect. Modified: cfe/trunk/lib/Tooling/Tooling.cpp Modified: cfe/trunk/lib/To

[PATCH] D54258: [Clang] Fix pretty printing of CUDA address spaces

2018-11-09 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Could this be tested using diagnostics that prints the type? Like in test/SemaOpenCL/address-spaces.cl. Repository: rC Clang https://reviews.llvm.org/D54258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:

[PATCH] D52296: [Clang] - Add -fdwarf-fission=split,single option.

2018-11-09 Thread George Rimar via Phabricator via cfe-commits
grimar added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:5889 const llvm::Triple &T = getToolChain().getTriple(); - if (Args.hasArg(options::OPT_gsplit_dwarf) && + if ((getDebugFissionKind(D, Args) == DwarfFissionKind::Split) && (T.isOSLinux() || T.is

[PATCH] D54253: [OpenCL][NFC] Improve test coverage of test/Index/opencl-types.cl

2018-11-09 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Are these types represented differently wrt targets? Repository: rC Clang https://reviews.llvm.org/D54253 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[PATCH] D54300: [clangd] Respect shouldIndexFile when collecting symbols.

2018-11-09 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/index/SymbolCollector.cpp:555 + auto Loc = findNameLoc(&ND); + if (!shouldIndexFile(SM, SM.getFileID(Loc), Opts, &FilesToIndexCache)) +return nullptr; Should we use `getTokenLocation` like what we do below?

[PATCH] D54298: [clang-cl] Add warning for /Zc:dllexportInlines- when the flag is used with /fallback

2018-11-09 Thread Takuto Ikuta via Phabricator via cfe-commits
takuto.ikuta updated this revision to Diff 173302. takuto.ikuta added a comment. warn in GetCommand Repository: rL LLVM https://reviews.llvm.org/D54298 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/lib/Driver/ToolChains/MSVC.cpp clang/test/Driver/cl-options.c Index:

[PATCH] D54298: [clang-cl] Add warning for /Zc:dllexportInlines- when the flag is used with /fallback

2018-11-09 Thread Takuto Ikuta via Phabricator via cfe-commits
takuto.ikuta marked an inline comment as done. takuto.ikuta added a comment. Thank you for review! Repository: rL LLVM https://reviews.llvm.org/D54298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

[clang-tools-extra] r346488 - [clangd] Make TestTU build with preamble, and fix the fallout.

2018-11-09 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Nov 9 04:56:49 2018 New Revision: 346488 URL: http://llvm.org/viewvc/llvm-project?rev=346488&view=rev Log: [clangd] Make TestTU build with preamble, and fix the fallout. Our testing didn't reflect reality: live clangd almost always uses a preamble, and sometimes the p

[PATCH] D54298: [clang-cl] Add warning for /Zc:dllexportInlines- when the flag is used with /fallback

2018-11-09 Thread Hans Wennborg via Phabricator via cfe-commits
hans accepted this revision. hans added a comment. This revision is now accepted and ready to land. lgtm Repository: rL LLVM https://reviews.llvm.org/D54298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mai

[PATCH] D54303: [clangd] Don't treat top-level decls as "local" if they are from the preamble.

2018-11-09 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ioeric. These get passed to HandleTopLevelDecl() if they happen to have been deserialized for any reason. We don't want to treat them as part of

r346491 - [clang-cl] Add warning for /Zc:dllexportInlines- when the flag is used with /fallback

2018-11-09 Thread Takuto Ikuta via cfe-commits
Author: tikuta Date: Fri Nov 9 05:25:45 2018 New Revision: 346491 URL: http://llvm.org/viewvc/llvm-project?rev=346491&view=rev Log: [clang-cl] Add warning for /Zc:dllexportInlines- when the flag is used with /fallback Summary: This is followup of https://reviews.llvm.org/D51340 Reviewers: hans

[PATCH] D54298: [clang-cl] Add warning for /Zc:dllexportInlines- when the flag is used with /fallback

2018-11-09 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC346491: [clang-cl] Add warning for /Zc:dllexportInlines- when the flag is used with… (authored by tikuta, committed by ). Changed prior to commit: https://reviews.llvm.org/D54298?vs=173302&id=173305#toc

[PATCH] D54303: [clangd] Don't treat top-level decls as "local" if they are from the preamble.

2018-11-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM! Comment at: unittests/clangd/ClangdUnitTests.cpp:268 + auto AST = TU.build(); + ASSERT_EQ(AST.getLocalTopLevelDecls().size(), 1u); + NamedDecl *ND = dy

[PATCH] D54281: [clang-tidy] fix PR39583 - ignoring ParenCast for string-literals in pro-bounds-array-to-pointer-decay

2018-11-09 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 173311. JonasToth added a comment. - use ignoringParens instead Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54281 Files: clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.cpp test/clang-tidy/cppcoreguidelines-pro-bound

[PATCH] D54307: [clang] overload ignoringParens for Expr

2018-11-09 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth created this revision. JonasToth added a reviewer: aaron.ballman. Herald added a subscriber: cfe-commits. This patch allows fixing PR39583. Repository: rC Clang https://reviews.llvm.org/D54307 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h li

[PATCH] D54258: [Clang] Fix pretty printing of CUDA address spaces

2018-11-09 Thread Richard Membarth via Phabricator via cfe-commits
richardmembarth added a comment. Same problem here: The CUDA memory space specifiers are represented via attributes, e.g. `CUDASharedAttr` and only converted in CodeGen to `LangAS::cuda_shared`. We would need a different frontend that annotates `LangAS::cuda_shared`. Repository: rC Clang ht

[PATCH] D54309: [AST] Allow limiting the scope of common AST traversals (getParents, RAV).

2018-11-09 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added reviewers: klimek, ioeric. Herald added subscribers: cfe-commits, mgorny. The goal is to allow analyses such as clang-tidy checks to run on a subset of the AST, e.g. "only on main-file decls" for interactive tools. Today, these become "problematica

[PATCH] D54310: Make clang-based tools find libc++ on MacOS

2018-11-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added reviewers: sammccall, arphaman. Herald added a reviewer: EricWF. Herald added subscribers: kadircet, christof, ioeric. When they read compiler args from compile_commands.json. This change allows to run clang-based tools, like clang-tidy or c

[PATCH] D54311: Add a test checking clang-tidy can find libc++ on Mac

2018-11-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added reviewers: sammccall, arphaman. Herald added a reviewer: EricWF. Herald added a subscriber: christof. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54311 Files: test/clang-tidy/Inputs/mock-libcxx/include/c++/v1/mock_vect

Re: r345971 - Reapply Logging: make os_log buffer size an integer constant expression.

2018-11-09 Thread Sam McCall via cfe-commits
Sorry I lost track of this. Having understood the code a bit more, the current split between the AST/analysis/static analyzer isn't as clear as I thought. So I'm not sure the layering is perfect here, but the fault doesn't lie with your patch. Sorry for the noise. On Fri, Nov 2, 2018 at 5:43 PM Ti

[PATCH] D54300: [clangd] Respect shouldIndexFile when collecting symbols.

2018-11-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 173324. hokein marked 2 inline comments as done. hokein added a comment. Address comments and simplify the code. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54300 Files: clangd/index/SymbolCollector.cpp clangd/index/SymbolCollector.h

[PATCH] D54300: [clangd] Respect shouldIndexFile when collecting symbols.

2018-11-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/index/SymbolCollector.cpp:555 + auto Loc = findNameLoc(&ND); + if (!shouldIndexFile(SM, SM.getFileID(Loc), Opts, &FilesToIndexCache)) +return nullptr; ioeric wrote: > Should we use `getTokenLocation` like wha

[PATCH] D54300: [clangd] Respect shouldIndexFile when collecting symbols.

2018-11-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 173326. hokein added a comment. clang-format and fix typos Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54300 Files: clangd/index/SymbolCollector.cpp clangd/index/SymbolCollector.h unittests/clangd/SymbolCollectorTests.cpp Index: un

[PATCH] D54300: [clangd] Respect shouldIndexFile when collecting symbols.

2018-11-09 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/index/SymbolCollector.cpp:217 +bool shouldIndexFile(const Decl& D, const SymbolCollector::Options &Opts, + llvm::DenseMap *FilesToIndexCache) { nit: this is very easily confused with the callb

[clang-tools-extra] r346503 - [clangd] Don't treat top-level decls as "local" if they are from the preamble.

2018-11-09 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Nov 9 07:35:00 2018 New Revision: 346503 URL: http://llvm.org/viewvc/llvm-project?rev=346503&view=rev Log: [clangd] Don't treat top-level decls as "local" if they are from the preamble. Summary: These get passed to HandleTopLevelDecl() if they happen to have been dese

[PATCH] D54303: [clangd] Don't treat top-level decls as "local" if they are from the preamble.

2018-11-09 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. sammccall marked an inline comment as done. Closed by commit rCTE346503: [clangd] Don't treat top-level decls as "local" if they are from the preamble. (authored by sammccall, committed by ). Changed prior to commit: htt

[PATCH] D53764: [OpenCL] Enable address spaces for references in C++

2018-11-09 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 173334. Anastasia added a comment. Changed the assert for address space conversion. https://reviews.llvm.org/D53764 Files: include/clang/Sema/Sema.h lib/AST/Expr.cpp lib/CodeGen/CGExpr.cpp lib/Sema/DeclSpec.cpp lib/Sema/SemaDecl.cpp lib/Sema/S

Re: r346491 - [clang-cl] Add warning for /Zc:dllexportInlines- when the flag is used with /fallback

2018-11-09 Thread Nico Weber via cfe-commits
This only prints the warning when /fallback actually happens, right? I don't think that's good enough: If we build a few TUs with /dllexportInlines- and don't fall back, those .obj files are not abi compatible with the cl-built ones. (Consider all dllexport TUs of a header being built with clang-cl

[PATCH] D54310: Make clang-based tools find libc++ on MacOS

2018-11-09 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. This is hacky, but solves an important problem. If you know of a good reviewer for this, you may want a second opinion! Comment at: include/clang/Lex/HeaderSearchOptio

[PATCH] D52273: [clangd] Initial implementation of expected types

2018-11-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 173337. ilya-biryukov added a comment. - Simplify the initial implementation - Rename SType to OpaqueType Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52273 Files: clangd/CMakeLists.txt clangd/ExpectedTypes.cpp clangd/Expected

[PATCH] D52273: [clangd] Initial implementation of expected types

2018-11-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. I've run the measurements on a highly simplified vs the original complicated model and got roughly the same results wrt to ranking improvements, so sending a new version of the patch with highly simplified mode for the type representation. I believe there are stil

[PATCH] D54319: clang-cl: Add documentation for /Zc:dllexportInlines-

2018-11-09 Thread Hans Wennborg via Phabricator via cfe-commits
hans created this revision. hans added reviewers: takuto.ikuta, thakis, rnk. A great feature needs great documentation. Please take a look! https://reviews.llvm.org/D54319 Files: docs/UsersManual.rst include/clang/Driver/CLCompatOptions.td Index: include/clang/Driver/CLCompatOptions.td ===

[PATCH] D52274: [clangd] Collect and store expected types in the index

2018-11-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 173340. ilya-biryukov added a comment. - Rebase and update after dependent changes. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52274 Files: clangd/index/Index.cpp clangd/index/Index.h clangd/index/SymbolCollector.cpp clang

[PATCH] D52276: [clangd] Add type boosting in code completion

2018-11-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 173341. ilya-biryukov added a comment. - Rebase and update wrt to dependent changes Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52276 Files: clangd/CodeComplete.cpp clangd/Quality.cpp clangd/Quality.h Index: clangd/Quality.

r346507 - [OPENMP][NVPTX]Allow to use shared memory for the

2018-11-09 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Fri Nov 9 08:18:04 2018 New Revision: 346507 URL: http://llvm.org/viewvc/llvm-project?rev=346507&view=rev Log: [OPENMP][NVPTX]Allow to use shared memory for the target|teams|distribute variables. If the total size of the variables, declared in target|teams|distribute region

Re: r346491 - [clang-cl] Add warning for /Zc:dllexportInlines- when the flag is used with /fallback

2018-11-09 Thread Hans Wennborg via cfe-commits
On Fri, Nov 9, 2018 at 4:53 PM, Nico Weber wrote: > This only prints the warning when /fallback actually happens, right? No, it prints it when the fallback job is created, not when (or if) it runs. I.e. it prints if the /fallback flag is used, regardless of whether it actually falls back or not.

[PATCH] D53488: [clang-tidy] Improving narrowing conversions

2018-11-09 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet updated this revision to Diff 173343. gchatelet marked 13 inline comments as done. gchatelet added a comment. - Addressing comments, adding Option to disable FP to FP narrowing warnings, handling FP literals. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53488 Files

[PATCH] D54321: [AST] Store the expressions in ParenListExpr in a trailing array

2018-11-09 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added a reviewer: rsmith. riccibruno added a project: clang. Herald added a reviewer: shafik. Herald added a subscriber: cfe-commits. Use the newly available space in the bit-fields of `Stmt`, and store the expressions in `ParenListExpr` in a trailing a

[PATCH] D54307: [clang] overload ignoringParens for Expr

2018-11-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/ASTMatchers/ASTMatchers.h:814 /// would match the declaration for fp. -AST_MATCHER_P(QualType, ignoringParens, - internal::Matcher, InnerMatcher) { +AST_MATCHER_P_OVERLOAD(QualType, ignoringParens, inter

[PATCH] D54307: [clang] overload ignoringParens for Expr

2018-11-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Also: the patch is missing unit tests. Repository: rC Clang https://reviews.llvm.org/D54307 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D54324: [AST] Store the value of CharacterLiteral inline if possible

2018-11-09 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added a reviewer: rsmith. riccibruno added a project: clang. Herald added a reviewer: shafik. Herald added a subscriber: cfe-commits. The vast majority of `CharacterLiteral`s have a value which fits into 8 bits (in the 2666 `CharacterLiteral`s in all of

[PATCH] D54204: [clangd] Initial clang-tidy diagnostics support.

2018-11-09 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 173357. sammccall marked an inline comment as done. sammccall added a comment. Address comments and rebase on https://reviews.llvm.org/D54309, addressing performance issues. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54204 Files: c

[PATCH] D54281: [clang-tidy] fix PR39583 - ignoring ParenCast for string-literals in pro-bounds-array-to-pointer-decay

2018-11-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from a minor commenting nit. Comment at: test/clang-tidy/cppcoreguidelines-pro-bounds-array-to-pointer-decay.cpp:44 +const char *g2() { +return

[PATCH] D54204: [clangd] Initial clang-tidy diagnostics support.

2018-11-09 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/ClangdUnit.cpp:175 +CTFactories.createChecks(CTContext.getPointer(), CTChecks); +for (const auto &Check : CTChecks) { + Check->registerPPCallbacks(*Clang); hokein wrote: > Maybe add the check names

[PATCH] D54325: [AST] Pack CXXBoolLiteralExpr, CXXNullPtrLiteralExpr and CXXThisExpr

2018-11-09 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added a reviewer: rsmith. riccibruno added a project: clang. Herald added a subscriber: cfe-commits. Use the newly available space in the bit-fields of `Stmt` to store some data from `CXXBoolLiteralExpr`, `CXXNullPtrLiteralExpr` and `CXXThisExpr`. This

[PATCH] D51554: [CUDA][OPENMP][NVPTX]Improve logic of the debug info support.

2018-11-09 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:292 + bool IsDebugEnabled = !A || A->getOption().matches(options::OPT_O0) || +Args.hasFlag(options::OPT_cuda_noopt_device_debug, + options::OPT_n

[PATCH] D54326: [AST] Pack CXXThrowExpr, CXXDefaultArgExpr and CXXDefaultInitExpr

2018-11-09 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added a reviewer: rsmith. riccibruno added a project: clang. Herald added a subscriber: cfe-commits. riccibruno added a dependency: D54325: [AST] Pack CXXBoolLiteralExpr, CXXNullPtrLiteralExpr and CXXThisExpr. Use the newly available space in the bit-f

r346520 - Use the correct address space when emitting the ctor function list

2018-11-09 Thread Dylan McKay via cfe-commits
Author: dylanmckay Date: Fri Nov 9 09:15:06 2018 New Revision: 346520 URL: http://llvm.org/viewvc/llvm-project?rev=346520&view=rev Log: Use the correct address space when emitting the ctor function list This patch modifies clang so that, if compiling for a target that explicitly specifies a nonz

r346521 - Introduce the _Clang scoped attribute token.

2018-11-09 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Fri Nov 9 09:19:45 2018 New Revision: 346521 URL: http://llvm.org/viewvc/llvm-project?rev=346521&view=rev Log: Introduce the _Clang scoped attribute token. Currently, we only accept clang as the scoped attribute identifier for double square bracket attributes provided

[PATCH] D53700: Support _Clang as a scoped attribute identifier

2018-11-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Thanks for the reviews -- I've commit in r346521. https://reviews.llvm.org/D53700 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listin

[PATCH] D54310: Make clang-based tools find libc++ on MacOS

2018-11-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 173364. ilya-biryukov marked 2 inline comments as done. ilya-biryukov added a comment. - Update the comment. Repository: rC Clang https://reviews.llvm.org/D54310 Files: include/clang/Lex/HeaderSearchOptions.h lib/Frontend/CreateInvocationFromCo

[PATCH] D54310: Make clang-based tools find libc++ on MacOS

2018-11-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D54310#1292924, @sammccall wrote: > If you know of a good reviewer for this, you may want a second opinion! This would definitely be nice, but I also don't know who'd be the proper person to review this. I'll take a pause until Monday,

[clang-tools-extra] r346524 - [clangd] Fix clang-tidy warnings.

2018-11-09 Thread Kadir Cetinkaya via cfe-commits
Author: kadircet Date: Fri Nov 9 09:33:48 2018 New Revision: 346524 URL: http://llvm.org/viewvc/llvm-project?rev=346524&view=rev Log: [clangd] Fix clang-tidy warnings. Modified: clang-tools-extra/trunk/unittests/clangd/TestTU.cpp Modified: clang-tools-extra/trunk/unittests/clangd/TestTU.cpp

[PATCH] D53764: [OpenCL] Enable address spaces for references in C++

2018-11-09 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/AST/Expr.cpp:1609 case CK_AddressSpaceConversion: -assert(getType()->isPointerType() || getType()->isBlockPointerType()); -assert(getSubExpr()->getType()->isPointerType() || - getSubExpr()->getType()->isBlockPoi

[PATCH] D54330: Driver: Make -fsanitize=shadow-call-stack compatible with -fsanitize-minimal-runtime.

2018-11-09 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added a reviewer: eugenis. Herald added subscribers: llvm-commits, cryptoad. Repository: rL LLVM https://reviews.llvm.org/D54330 Files: clang/lib/Driver/SanitizerArgs.cpp clang/test/Driver/fsanitize.c Index: clang/test/Driver/fsanitize.c ===

[PATCH] D52674: [AST] Add Obj-C discriminator to MS ABI RTTI

2018-11-09 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D52674#1291284, @smeenai wrote: > In https://reviews.llvm.org/D52674#1281747, @rjmccall wrote: > > > In https://reviews.llvm.org/D52674#1271814, @smeenai wrote: > > > > > @rjmccall I prototyped the ForRTTI parameter approach in > > > https://

[PATCH] D54258: [Clang] Fix pretty printing of CUDA address spaces

2018-11-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D54258#1292129, @richardmembarth wrote: > I think it's not so easy to provide such tests for CUDA. > CUDA memory space specifiers are implemented via attributes, e.g. `#define > __shared__ __attribute__((shared))`. > As a result of thi

[PATCH] D54330: Driver: Make -fsanitize=shadow-call-stack compatible with -fsanitize-minimal-runtime.

2018-11-09 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis accepted this revision. eugenis added a comment. This revision is now accepted and ready to land. LGTM Repository: rL LLVM https://reviews.llvm.org/D54330 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-b

[PATCH] D54330: Driver: Make -fsanitize=shadow-call-stack compatible with -fsanitize-minimal-runtime.

2018-11-09 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL346526: Driver: Make -fsanitize=shadow-call-stack compatible with -fsanitize-minimal… (authored by pcc, committed by ). Changed prior to commit: https://reviews.llvm.org/D54330?vs=173367&id=173368#toc

r346526 - Driver: Make -fsanitize=shadow-call-stack compatible with -fsanitize-minimal-runtime.

2018-11-09 Thread Peter Collingbourne via cfe-commits
Author: pcc Date: Fri Nov 9 09:54:49 2018 New Revision: 346526 URL: http://llvm.org/viewvc/llvm-project?rev=346526&view=rev Log: Driver: Make -fsanitize=shadow-call-stack compatible with -fsanitize-minimal-runtime. Differential Revision: https://reviews.llvm.org/D54330 Modified: cfe/trunk/

[PATCH] D53488: [clang-tidy] Improving narrowing conversions

2018-11-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp:108-113 + if (T.isSignedInteger()) +return {llvm::APSInt::getMinValue(Context.getTypeSize(&T), false), +llvm::APSInt::getMaxValue(Context.getTypeSize(&T),

[PATCH] D53974: [clang-tidy] new check: bugprone-too-small-loop-variable

2018-11-09 Thread Tamás Zolnai via Phabricator via cfe-commits
ztamas updated this revision to Diff 173372. ztamas added a comment. - Make local functions `static` Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53974 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt clang-tidy/bugprone/TooSmallLoopV

[PATCH] D53995: [analyzer] Drastically simplify the tblgen files used for checkers

2018-11-09 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Ping Repository: rC Clang https://reviews.llvm.org/D53995 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D54307: [clang] overload ignoringParens for Expr

2018-11-09 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: include/clang/ASTMatchers/ASTMatchers.h:814 /// would match the declaration for fp. -AST_MATCHER_P(QualType, ignoringParens, - internal::Matcher, InnerMatcher) { +AST_MATCHER_P_OVERLOAD(QualType, ignoringParens, internal:

[PATCH] D54307: [clang] overload ignoringParens for Expr

2018-11-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/ASTMatchers/ASTMatchers.h:814 /// would match the declaration for fp. -AST_MATCHER_P(QualType, ignoringParens, - internal::Matcher, InnerMatcher) { +AST_MATCHER_P_OVERLOAD(QualType, ignoringParens, inter

[PATCH] D54246: [clang-tidy] Add the abseil-duration-factory-scale check

2018-11-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/abseil/DurationFactoryScaleCheck.cpp:36 +GetScaleForFactory(llvm::StringRef FactoryName) { + static const auto *ScaleMap = + new std::unordered_map( hokein wrote: > aaron.ballman wrote: > > hwright

[PATCH] D53974: [clang-tidy] new check: bugprone-too-small-loop-variable

2018-11-09 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth accepted this revision. JonasToth added a comment. This revision is now accepted and ready to land. LGTM. Did you run this check in its final form against a bigger project? These results would be interesting. Do you have commit access? Repository: rCTE Clang Tools Extra https://rev

[PATCH] D54275: [HIP] Remove useless sections in linked files

2018-11-09 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC346536: [HIP] Remove useless sections in linked files (authored by yaxunl, committed by ). Repository: rC Clang https://reviews.llvm.org/D54275 Files: lib/Driver/ToolChains/CommonArgs.cpp Index: l

r346536 - [HIP] Remove useless sections in linked files

2018-11-09 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Fri Nov 9 10:52:05 2018 New Revision: 346536 URL: http://llvm.org/viewvc/llvm-project?rev=346536&view=rev Log: [HIP] Remove useless sections in linked files clang-offload-bundler creates __CLANG_OFFLOAD_BUNDLE__* sections in the bundles, which get into the linked files. Thes

[PATCH] D54325: [AST] Pack CXXBoolLiteralExpr, CXXNullPtrLiteralExpr and CXXThisExpr

2018-11-09 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 173383. riccibruno added a comment. Fix some typos in the added comments in `Stmt.h` Repository: rC Clang https://reviews.llvm.org/D54325 Files: include/clang/AST/ExprCXX.h include/clang/AST/Stmt.h Index: include/clang/AST/Stmt.h

[PATCH] D54334: [AVR] Automatically link CRT and libgcc from the system avr-gcc

2018-11-09 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay created this revision. dylanmckay added reviewers: aaron.ballman, kparzysz, asb, hfinkel. This patch modifies the AVR toolchain so that if avr-gcc and avr-libc are detected during compilation, the CRT, libgcc, libm, and libc anre linked. This matches avr-gcc's default behaviour, and th

[PATCH] D54307: [clang] overload ignoringParens for Expr

2018-11-09 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: include/clang/ASTMatchers/ASTMatchers.h:814 /// would match the declaration for fp. -AST_MATCHER_P(QualType, ignoringParens, - internal::Matcher, InnerMatcher) { +AST_MATCHER_P_OVERLOAD(QualType, ignoringParens, internal:

[PATCH] D54307: [clang] overload ignoringParens for Expr

2018-11-09 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 173391. JonasToth marked 3 inline comments as done. JonasToth added a comment. - add unit test Repository: rC Clang https://reviews.llvm.org/D54307 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h lib/ASTMatchers/D

r346542 - Fix a nondeterminism in the debug info for VLA size expressions.

2018-11-09 Thread Adrian Prantl via cfe-commits
Author: adrian Date: Fri Nov 9 11:17:56 2018 New Revision: 346542 URL: http://llvm.org/viewvc/llvm-project?rev=346542&view=rev Log: Fix a nondeterminism in the debug info for VLA size expressions. The artificial variable describing the array size is supposed to be called "__vla_expr", but this w

[PATCH] D52674: [AST] Add Obj-C discriminator to MS ABI RTTI

2018-11-09 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. In https://reviews.llvm.org/D52674#1293180, @rjmccall wrote: > In https://reviews.llvm.org/D52674#1291284, @smeenai wrote: > > > In https://reviews.llvm.org/D52674#1281747, @rjmccall wrote: > > > > > In https://reviews.llvm.org/D52674#1271814, @smeenai wrote: > > > > > >

[PATCH] D54307: [clang] overload ignoringParens for Expr

2018-11-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: sbenza, klimek. aaron.ballman added a comment. Adding a few other reviewers in case they have ideas on how to use the polymorphic matcher rather than the overload. If they don't have a better idea, then I think the overload approach is fine. Repository: rC Clan

r346547 - Allow a double-underscore spelling of Clang attributes using double square bracket syntax.

2018-11-09 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Fri Nov 9 11:37:18 2018 New Revision: 346547 URL: http://llvm.org/viewvc/llvm-project?rev=346547&view=rev Log: Allow a double-underscore spelling of Clang attributes using double square bracket syntax. This matches a similar behavior with GCC accepting [[gnu::__attr__

r346548 - Use the correct address space when bitcasting func pointer to int pointer

2018-11-09 Thread Dylan McKay via cfe-commits
Author: dylanmckay Date: Fri Nov 9 11:42:05 2018 New Revision: 346548 URL: http://llvm.org/viewvc/llvm-project?rev=346548&view=rev Log: Use the correct address space when bitcasting func pointer to int pointer When we cast a function pointer to an int pointer, at some pointer later it gets bitca

r346549 - Revert rL346454: Fix a use-after-free introduced by r344915.

2018-11-09 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Fri Nov 9 11:42:53 2018 New Revision: 346549 URL: http://llvm.org/viewvc/llvm-project?rev=346549&view=rev Log: Revert rL346454: Fix a use-after-free introduced by r344915. r344915 added a call to ApplyDebugLocation to the sanitizer check function emitter. Some of the saniti

Re: r346548 - Use the correct address space when bitcasting func pointer to int pointer

2018-11-09 Thread Roman Lebedev via cfe-commits
The codegen change can't be tested? On Fri, Nov 9, 2018 at 10:44 PM Dylan McKay via cfe-commits wrote: > > Author: dylanmckay > Date: Fri Nov 9 11:42:05 2018 > New Revision: 346548 > > URL: http://llvm.org/viewvc/llvm-project?rev=346548&view=rev > Log: > Use the correct address space when bitcast

[PATCH] D54307: [clang] overload ignoringParens for Expr

2018-11-09 Thread Samuel Benzaquen via Phabricator via cfe-commits
sbenza added inline comments. Comment at: include/clang/ASTMatchers/ASTMatchers.h:814 /// would match the declaration for fp. -AST_MATCHER_P(QualType, ignoringParens, - internal::Matcher, InnerMatcher) { +AST_MATCHER_P_OVERLOAD(QualType, ignoringParens, internal::Ma

[PATCH] D54307: [clang] overload ignoringParens for Expr

2018-11-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Comment at: include/clang/ASTMatchers/ASTMatchers.h:814 /// would match the declaration for fp. -AST_MATCHER_P(QualType, ignoringParens, - i

r346551 - [OPENMP][NVPTX]Extend number of constructs executed in SPMD mode.

2018-11-09 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Fri Nov 9 12:03:19 2018 New Revision: 346551 URL: http://llvm.org/viewvc/llvm-project?rev=346551&view=rev Log: [OPENMP][NVPTX]Extend number of constructs executed in SPMD mode. If the statements between target|teams|distribute directives does not require execution in master

[PATCH] D54344: [Clang][CodeGen][CXX]: Workaround __attribute((no_destroy)) crash/incorrect code generation.

2018-11-09 Thread Kristina Brooks via Phabricator via cfe-commits
kristina created this revision. kristina added reviewers: rsmith, clang, JonasToth, EricWF, aaron.ballman. Herald added subscribers: dexonsmith, mehdi_amini. Herald added a reviewer: jfb. Difficult to reproduce crash, attempted it in the test, it appears to not trigger it. I can consistently repr

[PATCH] D33029: [clang-format] add option for dangling parenthesis

2018-11-09 Thread Adam Van Prooyen via Phabricator via cfe-commits
sciencemanx added a comment. @djasper bump -- this feature is also really important to our team. https://reviews.llvm.org/D33029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D54344: [Clang][CodeGen][CXX]: Workaround __attribute((no_destroy)) crash/incorrect code generation.

2018-11-09 Thread Kristina Brooks via Phabricator via cfe-commits
kristina updated this revision to Diff 173411. kristina added a comment. Revised (style/ordering). https://reviews.llvm.org/D54344 Files: lib/CodeGen/CGDeclCXX.cpp Index: lib/CodeGen/CGDeclCXX.cpp === --- lib/CodeGen/CGDeclCXX.

[PATCH] D52674: [AST] Add Obj-C discriminator to MS ABI RTTI

2018-11-09 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Threading a new options argument through mangleType that includes QualifierMangleMode as well as these obj-c options seems reasonable. Repository: rC Clang https://reviews.llvm.org/D52674 ___ cfe-commits mailing list cfe-com

[PATCH] D54307: [clang] overload ignoringParens for Expr

2018-11-09 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: include/clang/ASTMatchers/ASTMatchers.h:814 /// would match the declaration for fp. -AST_MATCHER_P(QualType, ignoringParens, - internal::Matcher, InnerMatcher) { +AST_MATCHER_P_OVERLOAD(QualType, ignoringParens, internal:

[PATCH] D54344: [Clang][CodeGen][CXX]: Workaround __attribute((no_destroy)) crash/incorrect code generation.

2018-11-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a reviewer: erik.pilkington. erik.pilkington added a comment. Have you tried running creduce on the preprocessed source? We should really have a real reproducer for this, otherwise its really hard to tell what the underlying problem is. https://reviews.llvm.org/D54344

Re: [clang-tools-extra] r346461 - Ignore implicit things like ConstantExpr.

2018-11-09 Thread Bill Wendling via cfe-commits
This fix was submitted because a test was failing without it. :-) On Thu, Nov 8, 2018 at 10:08 PM Roman Lebedev wrote: > Test? > > On Fri, Nov 9, 2018 at 4:34 AM Bill Wendling via cfe-commits > wrote: > > > > Author: void > > Date: Thu Nov 8 17:32:30 2018 > > New Revision: 346461 > > > > URL:

Re: r346491 - [clang-cl] Add warning for /Zc:dllexportInlines- when the flag is used with /fallback

2018-11-09 Thread Nico Weber via cfe-commits
Ah cool. But the diagnostic is "option /dllexportInlines- is ignored when /fallback happens" – shouldn't it be ignored regardless of if fallback happens? Does that happen and the warning text is wrong? On Fri, Nov 9, 2018 at 11:20 AM Hans Wennborg wrote: > On Fri, Nov 9, 2018 at 4:53 PM, Nico We

[PATCH] D54307: [ASTMatchers] overload ignoringParens for Expr

2018-11-09 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 173422. JonasToth added a comment. - add unit test Repository: rC Clang https://reviews.llvm.org/D54307 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h lib/ASTMatchers/Dynamic/Registry.cpp unittests/ASTMatchers/

  1   2   >