[PATCH] D46180: [clang-format] Refactor #include insertion/deletion functionality into a class.

2018-04-27 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. There isn't actually as much code changed as it appears to be, but phabricator doens't understand the diff very well... `git diff` might be an easier way to review the patch. Repository: rC Clang https://reviews.llvm.org/D46180

[PATCH] D37475: Make MultiplexASTDeserializationListener part of the API [NFC]

2018-04-27 Thread Raphael Isemann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL331021: Make MultiplexASTDeserializationListener part of the API [NFC] (authored by teemperor, committed by ). Changed prior to commit: https://reviews.llvm.org/D37475?vs=113847=144287#toc Repository:

[PATCH] D45931: [ASTMatchers] Don't garble the profiling output when multiple TU's are processed

2018-04-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Ping? Repository: rC Clang https://reviews.llvm.org/D45931 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44609: [Clang-Format] New option BreakBeforeLambdaBody to manage lambda line break inside function parameter call

2018-04-27 Thread Francois JEAN via Phabricator via cfe-commits
Wawha added a comment. Hi klimek, many thank for your comments. I will made the modifications you propose and then update this patch. Repository: rC Clang https://reviews.llvm.org/D44609 ___ cfe-commits mailing list

[PATCH] D41537: Optionally add code completion results for arrow instead of dot

2018-04-27 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added inline comments. Comment at: include/clang/Sema/CodeCompleteConsumer.h:704 +CXAvailabilityKind Availability, +const std::vector ) : Allocator(Allocator), CCTUInfo(CCTUInfo), Priority(Priority),

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-04-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. I just feel like pointing out that you can already do that: $ clang-tidy -checks=clang-analyzer-alpha* -p <> (be wary of `*` expanding) `clang-tidy --help` says: -checks= - <...> This option's value is appended

[PATCH] D42966: Fix USR generation in the presence of #line directives or linemarkes

2018-04-27 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Re: locations in parameter USRs: OK, so reading through the code, it looks like locations are included in USRs: - for macros (except from system headers) - for decls that aren't externally visible (static etc, function parameters, locals) - an objective-c class

[PATCH] D45815: [libclang] Add options to limit skipping of function bodies

2018-04-27 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik updated this revision to Diff 144303. nik added a comment. Reduction to skip-in-preamble-only functionality. Repository: rC Clang https://reviews.llvm.org/D45815 Files: include/clang-c/Index.h include/clang/Frontend/ASTUnit.h lib/Frontend/ASTUnit.cpp

[PATCH] D45815: [libclang] Add options to limit skipping of function bodies

2018-04-27 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. In https://reviews.llvm.org/D45815#1079327, @ilya-biryukov wrote: > > OK, I've rechecked this change. I don't see any obvious mistake :) > > I think I got to the bottom of it. We didn't expect a big win, because we > expect people to not put their non-template code into the

[PATCH] D41537: Optionally add code completion results for arrow instead of dot

2018-04-27 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan updated this revision to Diff 144285. yvvan marked 4 inline comments as done. yvvan added a comment. Minor clean-up according to the last comments https://reviews.llvm.org/D41537 Files: include/clang-c/Index.h include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D46176: Pull helper class Environment from clangFormat into libToolingCore [NFC]

2018-04-27 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: djasper. Herald added subscribers: cfe-commits, mgorny, klimek. This can be used to create a virtual environment (incl. VFS, source manager) for code snippets. The existing clang::format::Environment is implemented based on the new

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-04-27 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/AST/Expr.cpp:870 + if (C.getLangOpts().OpenCL && Ty.getAddressSpace() == LangAS::Default) +Ty = C.getAddrSpaceQualType(Ty, LangAS::opencl_constant); + bader wrote: > As `Ty` is passed by value, shouldn't we

r331021 - Make MultiplexASTDeserializationListener part of the API [NFC]

2018-04-27 Thread Raphael Isemann via cfe-commits
Author: teemperor Date: Fri Apr 27 00:05:40 2018 New Revision: 331021 URL: http://llvm.org/viewvc/llvm-project?rev=331021=rev Log: Make MultiplexASTDeserializationListener part of the API [NFC] Summary: This patch moves the MultiplexASTDeserializationListener declaration into a public header.

r331020 - [CodeGen] Avoid destructing a callee-destructued struct type in a

2018-04-27 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Apr 26 23:57:00 2018 New Revision: 331020 URL: http://llvm.org/viewvc/llvm-project?rev=331020=rev Log: [CodeGen] Avoid destructing a callee-destructued struct type in a function if a function delegates to another function. Fix a bug introduced in r328731, which caused

[PATCH] D44934: [analyzer] Improve the modeling of `memset()`.

2018-04-27 Thread Henry Wong via Phabricator via cfe-commits
MTC added a comment. ping^2 Repository: rC Clang https://reviews.llvm.org/D44934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46180: [clang-format] Refactor #include insertion/deletion functionality into a class.

2018-04-27 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, klimek. The class will be moved into libToolingCore as followup. The new behaviors in this patch: - New #include is inserted in the right position in a #include block to preserver

[PATCH] D46035: [clangd] Fix unicode handling, using UTF-16 where LSP requires it.

2018-04-27 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. sammccall marked 2 inline comments as done. Closed by commit rL331029: [clangd] Fix unicode handling, using UTF-16 where LSP requires it. (authored by sammccall, committed by ). Herald added a subscriber: llvm-commits.

[clang-tools-extra] r331029 - [clangd] Fix unicode handling, using UTF-16 where LSP requires it.

2018-04-27 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Apr 27 04:59:28 2018 New Revision: 331029 URL: http://llvm.org/viewvc/llvm-project?rev=331029=rev Log: [clangd] Fix unicode handling, using UTF-16 where LSP requires it. Summary: The Language Server Protocol unfortunately mandates that locations in files be

[PATCH] D46108: [ARM] Add __ARM_FEATURE_DOTPROD pre-defined macro

2018-04-27 Thread Oliver Stannard via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331038: [ARM] Add __ARM_FEATURE_DOTPROD pre-defined macro (authored by olista01, committed by ). Changed prior to commit: https://reviews.llvm.org/D46108?vs=144080=144339#toc Repository: rC Clang

r331038 - [ARM] Add __ARM_FEATURE_DOTPROD pre-defined macro

2018-04-27 Thread Oliver Stannard via cfe-commits
Author: olista01 Date: Fri Apr 27 06:56:02 2018 New Revision: 331038 URL: http://llvm.org/viewvc/llvm-project?rev=331038=rev Log: [ARM] Add __ARM_FEATURE_DOTPROD pre-defined macro This adds a pre-defined macro to test if the compiler has support for the v8.2-A dot rpoduct intrinsics in AArch32

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-04-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D46159#1080939, @lebedev.ri wrote: > Oh, hm. > I just needed something to view the call graph. > I have almost wrote a clang-tidy check using `analysis/CallGraph.h`, but > then i noticed/remembered that clang static analyzer has that

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-04-27 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: lib/AST/Expr.cpp:870 + if (C.getLangOpts().OpenCL && Ty.getAddressSpace() == LangAS::Default) +Ty = C.getAddrSpaceQualType(Ty, LangAS::opencl_constant); + Anastasia wrote: > bader wrote: > > As `Ty` is passed by

[PATCH] D46180: [clang-format] Refactor #include insertion/deletion functionality into a class.

2018-04-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. This change LG as an extraction of the helper functionality to be reused in clang, clang-tidy, etc. However, I feel there are potential improvements both to the underlying code and the new APIs that we could make. I left some comments, trying to focus on

[PATCH] D46183: [clangd] Incorporate #occurrences in scoring code complete results.

2018-04-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. the patch LG and fixes the problem of llvm namespace not showing up in completions from the static index. Let's add some tests and ship it! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46183 ___

[PATCH] D46015: [OpenCL] Add separate read_only and write_only pipe IR types

2018-04-27 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL331026: [OpenCL] Add separate read_only and write_only pipe IR types (authored by svenvh, committed by ). Herald added a

[PATCH] D46183: [clangd] Incorporate #occurrences in scoring code complete results.

2018-04-27 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, jkorous, MaskRay, ioeric, klimek. needs tests Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46183 Files: clangd/CodeComplete.cpp clangd/index/Index.cpp

[PATCH] D46180: [clang-format] Refactor #include insertion/deletion functionality into a class.

2018-04-27 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 144319. ioeric marked 2 inline comments as done. ioeric added a comment. Addressed review comments. Repository: rC Clang https://reviews.llvm.org/D46180 Files: lib/Format/Format.cpp unittests/Format/CleanupTest.cpp Index:

[PATCH] D46180: [clang-format] Refactor #include insertion/deletion functionality into a class.

2018-04-27 Thread Eric Liu via Phabricator via cfe-commits
ioeric marked 7 inline comments as done. ioeric added a comment. Thanks for reviewing this! In https://reviews.llvm.org/D46180#1080822, @ilya-biryukov wrote: > This change LG as an extraction of the helper functionality to be reused in > clang, clang-tidy, etc. > However, I feel there are

[PATCH] D32902: [Analyzer] Iterator Checker - Part 7: Support for push and pop operations

2018-04-27 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 144330. baloghadamsoftware added a comment. Herald added a reviewer: george.karpenkov. Rebased to Part6. Also fixed a test failing now: it is not enough to mark the symbolic expressions as live, but if it is a SymIntExpr (it can be nothing else,

r331039 - [ARM,AArch64] Add intrinsics for dot product instructions

2018-04-27 Thread Oliver Stannard via cfe-commits
Author: olista01 Date: Fri Apr 27 07:03:32 2018 New Revision: 331039 URL: http://llvm.org/viewvc/llvm-project?rev=331039=rev Log: [ARM,AArch64] Add intrinsics for dot product instructions The ACLE spec which describes these intrinsics hasn't been published yet, but this is based on the final

[PATCH] D46035: [clangd] Fix unicode handling, using UTF-16 where LSP requires it.

2018-04-27 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 3 inline comments as done. sammccall added a comment. Thanks! Comment at: clangd/SourceCode.cpp:25 +// Returns true if CB returned true, false if we hit the end of string. +template +bool iterateCodepoints(StringRef U8, const Callback ) {

[PATCH] D45814: Fix an assertion when -print-prog-name=

2018-04-27 Thread Christian Bruel via Phabricator via cfe-commits
chrib added a comment. Hi Saleem, Thanks for your review. I have amended the patch to avoid checking the name on the common path. About your second comment, I'm not sure we have to fix -print-file-name= for an equivalent problem since in case of empty parameter, we do a concatenation with

[PATCH] D46188: [clang-tidy] Add a flag to enable debug checkers

2018-04-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added reviewers: alexfh, aaron.ballman, hokein. Herald added a subscriber: xazax.hun. After https://reviews.llvm.org/D46159 was created by @pfultz2, and i initially thought it was already possible, i had the need to view the call graph. I have almost

[PATCH] D45814: Fix an assertion when -print-prog-name=

2018-04-27 Thread Christian Bruel via Phabricator via cfe-commits
chrib updated this revision to Diff 144322. chrib added a comment. Move the non-null name check out of GetProgramPath and add a test case. Assume that we trust the callers to check for non null ProgramName. Repository: rC Clang https://reviews.llvm.org/D45814 Files: lib/Driver/Driver.cpp

[PATCH] D44143: [clang-tidy] Create properly seeded random generator check

2018-04-27 Thread Borsik Gábor via Phabricator via cfe-commits
boga95 updated this revision to Diff 144336. https://reviews.llvm.org/D44143 Files: clang-tidy/cert/CERTTidyModule.cpp clang-tidy/cert/CMakeLists.txt clang-tidy/cert/ProperlySeededRandomGeneratorCheck.cpp clang-tidy/cert/ProperlySeededRandomGeneratorCheck.h docs/ReleaseNotes.rst

[PATCH] D46109: [ARM, AArch64] Add intrinsics for dot product instructions

2018-04-27 Thread Oliver Stannard via Phabricator via cfe-commits
olista01 marked an inline comment as done. olista01 added inline comments. Comment at: test/CodeGen/arm-neon-dot-product.c:1 +// RUN: %clang_cc1 -triple armv8-linux-gnueabihf -target-cpu cortex-a57 -target-feature +dotprod \ +// RUN: -disable-O0-optnone -emit-llvm -o - %s |

[PATCH] D45999: [clangd] Retrieve minimally formatted comment text in completion.

2018-04-27 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. My main question/concern is: if these APIs extract/format based on CodeCompletionString and friends, what should our plan be using this this in AST-based features, such as hover? Comment at: clangd/CodeComplete.cpp:259 +

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-04-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Oh, hm. I just needed something to view the call graph. I have almost wrote a clang-tidy check using `analysis/CallGraph.h`, but then i noticed/remembered that clang static analyzer has that already. But `$ clang-tidy -checks=* -list-checks | grep -i analyzer | grep

[PATCH] D46187: [Analyzer] getRegisteredCheckers(): handle debug checkers too.

2018-04-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added reviewers: dcoughlin, alexfh, aaron.ballman, george.karpenkov, NoQ. Herald added subscribers: a.sidorin, szepet, xazax.hun. I would like to be able to trigger these debug checkers from clang-tidy, as a follow-up patch for

[PATCH] D46109: [ARM, AArch64] Add intrinsics for dot product instructions

2018-04-27 Thread Oliver Stannard via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331039: [ARM,AArch64] Add intrinsics for dot product instructions (authored by olista01, committed by ). Changed prior to commit: https://reviews.llvm.org/D46109?vs=144081=144341#toc Repository: rC

r331026 - [OpenCL] Add separate read_only and write_only pipe IR types

2018-04-27 Thread Sven van Haastregt via cfe-commits
Author: svenvh Date: Fri Apr 27 03:37:04 2018 New Revision: 331026 URL: http://llvm.org/viewvc/llvm-project?rev=331026=rev Log: [OpenCL] Add separate read_only and write_only pipe IR types SPIR-V encodes the read_only and write_only access qualifiers of pipes, so separate LLVM IR types are

[PATCH] D46002: [clangd] Parse all comments in Sema and completion.

2018-04-27 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. LG (once the dependencies are done!) Comment at: clangd/ClangdUnit.cpp:362 CI->getFrontendOpts().DisableFree = false; +

r331063 - [Modules][ObjC] ASTReader should add protocols for class extensions

2018-04-27 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Fri Apr 27 11:01:23 2018 New Revision: 331063 URL: http://llvm.org/viewvc/llvm-project?rev=331063=rev Log: [Modules][ObjC] ASTReader should add protocols for class extensions During deserialization clang is currently missing the merging of protocols into the canonical

[PATCH] D34331: func.wrap.func.con: Unset function before destroying anything

2018-04-27 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. It is agreed that it is untenable to support reentrancy for `std::function` assignment operators and I'm not trying to achieve that. Here we restrict reentrancy only to `std::function::operator=(nullptr_t)`. @mclow.lists where should the tests go if the standard

[PATCH] D45932: [clang-tidy][modernize-raw-string-literal] Don't replace upper ASCII with raw literals

2018-04-27 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. Aaron, any comments for the new revision? https://reviews.llvm.org/D45932 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44934: [analyzer] Improve the modeling of `memset()`.

2018-04-27 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hi Henry. I had a quick look at the patch, here are some remarks. Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:2092 + // 'invalidateRegions()', which will remove the pair + // in CStringLength map. So calls

[PATCH] D46143: [clang-format/ObjC] Use getIdentifierInfo() instead of tok::identifier

2018-04-27 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Looks good, thank you. Repository: rC Clang https://reviews.llvm.org/D46143 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-04-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D46159#1081392, @dcoughlin wrote: > In https://reviews.llvm.org/D46159#1081371, @lebedev.ri wrote: > > > Note that it is completely off by default, and is not listed in > > documentation, `clang-tidy --help`, > > so one would have to know

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-04-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang-tidy/ClangTidy.cpp:373-376 // FIXME: Remove this option once clang's cfg-temporary-dtors option defaults // to true. AnalyzerOptions->Config["cfg-temporary-dtors"] = Context.getOptions().AnalyzeTemporaryDtors ? "true"

[PATCH] D46035: [clangd] Fix unicode handling, using UTF-16 where LSP requires it.

2018-04-27 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: clang-tools-extra/trunk/clangd/SourceCode.cpp:38 +// 0xxx is ASCII, handled above. 10xxx is a trailing byte, invalid here. +// 1xxx is not valid UTF-8 at all. Assert because it's probably our bug. +

r331069 - s/LLVM_ON_WIN32/_WIN32/, clang

2018-04-27 Thread Nico Weber via cfe-commits
Author: nico Date: Fri Apr 27 12:11:14 2018 New Revision: 331069 URL: http://llvm.org/viewvc/llvm-project?rev=331069=rev Log: s/LLVM_ON_WIN32/_WIN32/, clang LLVM_ON_WIN32 is set exactly with MSVC and MinGW (but not Cygwin) in HandleLLVMOptions.cmake, which is where _WIN32 defined too. Just use

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-04-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Am i understanding correctly that the new `-enable-alpha-checks` flag doesn't enable alpha checks, but it only allows enabling them with a separate command? Also wanted to mention that developers who are interested in running analyzer alpha checkers over a compilation

Re: r331052 - [MC] Provide default value for IsResolved.

2018-04-27 Thread Nico Weber via cfe-commits
Nit: The comment just repeats what the line below it says. Does this have an observable effect? If so, should this have a test? On Fri, Apr 27, 2018 at 12:11 PM, Nirav Dave via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: niravd > Date: Fri Apr 27 09:11:24 2018 > New Revision:

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-04-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D46159#1081366, @dcoughlin wrote: > ... Note that it is completely off by default, and is not listed in documentation, `clang-tidy --help`, so one would have to know of the existence of that hidden flag first, and only then when that

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-04-27 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. In https://reviews.llvm.org/D46159#1081371, @lebedev.ri wrote: > Note that it is completely off by default, and is not listed in > documentation, `clang-tidy --help`, > so one would have to know of the existence of that hidden flag first, and > only then when that

[PATCH] D46024: [clang-format] Add SpaceBeforeCpp11BracedList option.

2018-04-27 Thread Ross Kirsling via Phabricator via cfe-commits
rkirsling added a comment. Guidelines page has been updated (https://trac.webkit.org/changeset/231085), though it may take a bit for the website to update. Repository: rC Clang https://reviews.llvm.org/D46024 ___ cfe-commits mailing list

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-04-27 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. I'm curious about the use case for this, since I don't think it ever makes sense to run all the alpha checks at once. These checks are typically a work in progress (they're not finished yet) and often have false positives that haven't been fixed yet. Often they don't

[PATCH] D46143: [clang-format/ObjC] Use getIdentifierInfo() instead of tok::identifier

2018-04-27 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331067: [clang-format/ObjC] Use getIdentifierInfo() instead of tok::identifier (authored by benhamilton, committed by ). Changed prior to commit: https://reviews.llvm.org/D46143?vs=144357=144377#toc

r331067 - [clang-format/ObjC] Use getIdentifierInfo() instead of tok::identifier

2018-04-27 Thread Ben Hamilton via cfe-commits
Author: benhamilton Date: Fri Apr 27 11:51:12 2018 New Revision: 331067 URL: http://llvm.org/viewvc/llvm-project?rev=331067=rev Log: [clang-format/ObjC] Use getIdentifierInfo() instead of tok::identifier Summary: Previously, we checked tokens for `tok::identifier` to see if they were identifiers

[PATCH] D46206: [clang-tidy] Add Apple prefix acronyms to objc-property-declaration

2018-04-27 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: Wizard, hokein. Herald added subscribers: cfe-commits, xazax.hun, klimek. This adds a few common Apple first-party API prefixes as acronyms to `objc-property-declaration`. Here's a list showing where these come from:

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-27 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added a comment. In https://reviews.llvm.org/D46135#1081193, @lebedev.ri wrote: > (Not everyone is always using trunk snapshots) > I'd guess it would be present for at least one release, so **I** would > expect to see that in both the clang and llvm release notes. Thanks - sounds

[PATCH] D40988: Clang-format: add finer-grained options for putting all arguments on one line

2018-04-27 Thread Russell McClellan via Phabricator via cfe-commits
russellmcc marked an inline comment as not done. russellmcc added a comment. Okay; I think I've responded to all feedback at this point. Thanks for your patience guiding me through my first contribution to this project. Let me know what else I can do to help get this merged!

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-27 Thread Sanjay Patel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331041: [Driver, CodeGen] add options to enable/disable an FP cast optimization (authored by spatel, committed by ). Changed prior to commit: https://reviews.llvm.org/D46135?vs=144226=144342#toc

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-04-27 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/AST/Expr.cpp:870 + if (C.getLangOpts().OpenCL && Ty.getAddressSpace() == LangAS::Default) +Ty = C.getAddrSpaceQualType(Ty, LangAS::opencl_constant); + Anastasia wrote: > bader wrote: > > Anastasia wrote: > >

[PATCH] D46190: For an ODR declaration, set the 'Used' bit on its associated declarations.

2018-04-27 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added a comment. Note: The patch includes the entry points to set Objective-C and OpenMP declarations, but I do not know anything about Objective-C or OpenMP. The functions just return without updating any extra 'Used' bit. Any suggestion on how to deal with those

[PATCH] D44684: [mips] Improve handling of -fno-[pic/PIC] option

2018-04-27 Thread Aleksandar Beserminji via Phabricator via cfe-commits
abeserminji added inline comments. Comment at: include/clang/Basic/DiagnosticDriverKinds.td:340 + "ignoring '%0' option as it cannot be used with " + "explicit use of -mabicalls and the N64 ABI">, InGroup; sdardis wrote: > Use the

[PATCH] D45814: Fix an assertion when -print-prog-name=

2018-04-27 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. This revision is now accepted and ready to land. Do you have commit access or do you need someone to commit this on your behalf? Repository: rC Clang https://reviews.llvm.org/D45814 ___

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-27 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added a comment. Should I add a bullet for this new flag/attribute to the clang release notes, the LLVM release, both? Or do we view this as temporary and not making it to the release? Repository: rC Clang https://reviews.llvm.org/D46135

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-04-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. Can you add a codegen test for 1.2, 2.0? Also, I am wondering whether this is valid for OpenCL C++. Do we need special handling for string literal? Comment at: lib/AST/Expr.cpp:870 + if (C.getLangOpts().OpenCL && Ty.getAddressSpace() ==

r331053 - Test commit removing trailing whitespace

2018-04-27 Thread Stuart Brady via cfe-commits
Author: stuart.brady Date: Fri Apr 27 09:11:56 2018 New Revision: 331053 URL: http://llvm.org/viewvc/llvm-project?rev=331053=rev Log: Test commit removing trailing whitespace Modified: cfe/trunk/lib/Sema/SemaDecl.cpp Modified: cfe/trunk/lib/Sema/SemaDecl.cpp URL:

[PATCH] D45815: [libclang] Allow skipping function bodies in preamble only

2018-04-27 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added inline comments. Comment at: lib/Parse/ParseCXXInlineMethods.cpp:104 - if (SkipFunctionBodies && (!FnD || Actions.canSkipFunctionBody(FnD)) && - trySkippingFunctionBody()) { + if (SkipFunctionBodies != SkipFunctionBodiesKind::None && + (!FnD ||

[PATCH] D45815: [libclang] Allow skipping function bodies in preamble only

2018-04-27 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. OK, to skip all function bodies in the preamble except for template functions and functions within a template class, I've amended the previous diff with: - a/lib/Parse/ParseCXXInlineMethods.cpp +++ b/lib/Parse/ParseCXXInlineMethods.cpp @@ -102,9 +102,14 @@ NamedDecl

[PATCH] D45815: [libclang] Allow skipping function bodies in preamble only

2018-04-27 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. Trying to format the diff in the previous comment: --- a/lib/Parse/ParseCXXInlineMethods.cpp +++ b/lib/Parse/ParseCXXInlineMethods.cpp @@ -102,9 +102,14 @@ NamedDecl *Parser::ParseCXXInlineMethodDef(AccessSpecifier AS, } if (SkipFunctionBodies !=

[PATCH] D46190: For an ODR declaration, set the 'Used' bit on its associated declarations.

2018-04-27 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso created this revision. CarlosAlbertoEnciso added reviewers: rsmith, erichkeane, probinson, dblaikie. CarlosAlbertoEnciso added a project: clang. Herald added a subscriber: aprantl. The following submission under review https://reviews.llvm.org/D44826 introduced an option to

r331048 - [MC] Modify MCAsmStreamer to always build MCAssembler. NFCI.

2018-04-27 Thread Nirav Dave via cfe-commits
Author: niravd Date: Fri Apr 27 08:45:54 2018 New Revision: 331048 URL: http://llvm.org/viewvc/llvm-project?rev=331048=rev Log: [MC] Modify MCAsmStreamer to always build MCAssembler. NFCI. Modified: cfe/trunk/tools/driver/cc1as_main.cpp Modified: cfe/trunk/tools/driver/cc1as_main.cpp URL:

r331057 - [docs] more dashes

2018-04-27 Thread Sanjay Patel via cfe-commits
Author: spatel Date: Fri Apr 27 09:24:39 2018 New Revision: 331057 URL: http://llvm.org/viewvc/llvm-project?rev=331057=rev Log: [docs] more dashes Modified: cfe/trunk/docs/ReleaseNotes.rst Modified: cfe/trunk/docs/ReleaseNotes.rst URL:

r331041 - [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-27 Thread Sanjay Patel via cfe-commits
Author: spatel Date: Fri Apr 27 07:22:48 2018 New Revision: 331041 URL: http://llvm.org/viewvc/llvm-project?rev=331041=rev Log: [Driver, CodeGen] add options to enable/disable an FP cast optimization As discussed in the post-commit thread for: rL330437 (

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-04-27 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/AST/Expr.cpp:870 + if (C.getLangOpts().OpenCL && Ty.getAddressSpace() == LangAS::Default) +Ty = C.getAddrSpaceQualType(Ty, LangAS::opencl_constant); + bader wrote: > Anastasia wrote: > > bader wrote: > > > As

[PATCH] D46115: [ASTImporter] properly import SrcLoc of Attr

2018-04-27 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hi all. I'm already here, invited by the Herald - just had no time to take a look (will change the script to add me as a reviewer). But thank you anyway! :) In the initial implementation

r331052 - [MC] Provide default value for IsResolved.

2018-04-27 Thread Nirav Dave via cfe-commits
Author: niravd Date: Fri Apr 27 09:11:24 2018 New Revision: 331052 URL: http://llvm.org/viewvc/llvm-project?rev=331052=rev Log: [MC] Provide default value for IsResolved. Modified: cfe/trunk/tools/driver/cc1as_main.cpp Modified: cfe/trunk/tools/driver/cc1as_main.cpp URL:

r331055 - [MC] Undo spurious commit added into r331052.

2018-04-27 Thread Nirav Dave via cfe-commits
Author: niravd Date: Fri Apr 27 09:16:06 2018 New Revision: 331055 URL: http://llvm.org/viewvc/llvm-project?rev=331055=rev Log: [MC] Undo spurious commit added into r331052. Modified: cfe/trunk/tools/driver/cc1as_main.cpp Modified: cfe/trunk/tools/driver/cc1as_main.cpp URL:

[PATCH] D44684: [mips] Improve handling of -fno-[pic/PIC] option

2018-04-27 Thread Aleksandar Beserminji via Phabricator via cfe-commits
abeserminji updated this revision to Diff 144344. abeserminji marked 2 inline comments as done. abeserminji added a comment. Comments resolved. https://reviews.llvm.org/D44684 Files: include/clang/Basic/DiagnosticDriverKinds.td lib/Driver/ToolChains/Arch/Mips.cpp

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-04-27 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. So i suspect the history here is: https://reviews.llvm.org/D26310 added a way to filter-out these clang analyzer checks, which removed these checks from being available in clang-tidy,

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D46135#1081165, @spatel wrote: > Should I add a bullet for this new flag/attribute to the clang release notes, > the LLVM release, both? Or do we view this as temporary and not making it to > the release? (Not everyone is always using

[PATCH] D46143: [clang-format/ObjC] Use getIdentifierInfo() instead of tok::identifier

2018-04-27 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 144357. benhamilton added a comment. Add helper canBeObjCSelectorComponent() with comments. Repository: rC Clang https://reviews.llvm.org/D46143 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTestObjC.cpp Index:

r331056 - [docs] add -ffp-cast-overflow-workaround to the release notes

2018-04-27 Thread Sanjay Patel via cfe-commits
Author: spatel Date: Fri Apr 27 09:21:22 2018 New Revision: 331056 URL: http://llvm.org/viewvc/llvm-project?rev=331056=rev Log: [docs] add -ffp-cast-overflow-workaround to the release notes This option was added with: D46135 rL331041 ...copying the text from UsersManual.rst for more exposure.

Re: r331056 - [docs] add -ffp-cast-overflow-workaround to the release notes

2018-04-27 Thread Richard Smith via cfe-commits
On 27 April 2018 at 09:21, Sanjay Patel via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: spatel > Date: Fri Apr 27 09:21:22 2018 > New Revision: 331056 > > URL: http://llvm.org/viewvc/llvm-project?rev=331056=rev > Log: > [docs] add -ffp-cast-overflow-workaround to the release notes

[PATCH] D41627: [Modules TS] Fix namespace visibility

2018-04-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/AST/DeclBase.cpp:285 +Decl::ModuleOwnershipKind Decl::getModuleOwnershipKindForChildOf(DeclContext *DC) { + // Ignore namespaces because they're visible by default. + while (DC && DC->isNamespace()) "because

[PATCH] D45177: CStringChecker, check strlcpy/strlcat

2018-04-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:106 +bool isAppending, +bool canOverlap = false) const; The fact that the regular `strcpy`/`strcat` isn't checked for overlaps

Re: r331056 - [docs] add -ffp-cast-overflow-workaround to the release notes

2018-04-27 Thread Richard Smith via cfe-commits
On 27 April 2018 at 17:09, Chandler Carruth via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Fri, Apr 27, 2018 at 4:36 PM Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> On 27 April 2018 at 16:07, Sanjay Patel via cfe-commits < >> cfe-commits@lists.llvm.org>

[PATCH] D46190: For an ODR declaration, set the 'Used' bit on its associated declarations.

2018-04-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D46190#1081773, @rsmith wrote: > No, absolutely not. This would be insanely expensive, and marks entirely > unrelated things "used". My apologies, reading this again it comes off a lot harsher than I'd intended. Repository: rC Clang

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-04-27 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. > Am i understanding correctly that the new -enable-alpha-checks flag doesn't > enable alpha checks, but it only allows enabling them with a separate command? Yes, it enables them to be selected by clang tidy. Repository: rCTE Clang Tools Extra

r331089 - [analyzer] ObjCAutoreleaseWrite: Support a few more APIs and fix warning text.

2018-04-27 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Apr 27 15:00:51 2018 New Revision: 331089 URL: http://llvm.org/viewvc/llvm-project?rev=331089=rev Log: [analyzer] ObjCAutoreleaseWrite: Support a few more APIs and fix warning text. API list and improved warning text composed by Devin Coughlin. Modified:

[PATCH] D46218: PR37275 packed attribute should not apply to base classes

2018-04-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith created this revision. rsmith added a reviewer: rjmccall. Clang incorrectly applies the packed attribute to base classes. Per GCC's documentation and as can be observed from its behavior, packed only applies to members, not base classes. This change is conditioned behind

[PATCH] D46148: [CUDA] Added -f[no-]cuda-short-ptr option

2018-04-27 Thread Artem Belevich via Phabricator via cfe-commits
tra updated this revision to Diff 144419. tra added a subscriber: arsenm. tra added a comment. Do not use subtarget feature to control codegen of short pointers. Instead we need to add a field to TargetOptions which is the only way to pass this info to NVPTXTargetInfo constructor where we

[PATCH] D45177: CStringChecker, check strlcpy/strlcat

2018-04-27 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331096: [analyzer] CStringChecker: Add support for BSD strlcpy() and strlcat(). (authored by dergachev, committed by ). Changed prior to commit: https://reviews.llvm.org/D45177?vs=140667=144421#toc

[PATCH] D41566: [Modules TS] Diagnose exported internal linkage declarations

2018-04-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/DeclBase.h:2055-2075 +template<> +struct GraphTraits { + using NodeRef = const ::clang::Decl *; + using ChildIteratorType = ::clang::DeclContext::decl_iterator; + + static NodeRef getEntryNode(const

r331096 - [analyzer] CStringChecker: Add support for BSD strlcpy() and strlcat().

2018-04-27 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Apr 27 16:50:55 2018 New Revision: 331096 URL: http://llvm.org/viewvc/llvm-project?rev=331096=rev Log: [analyzer] CStringChecker: Add support for BSD strlcpy() and strlcat(). Patch by David Carlier! Differential Revision: https://reviews.llvm.org/D45177 Modified:

Re: r331056 - [docs] add -ffp-cast-overflow-workaround to the release notes

2018-04-27 Thread Chandler Carruth via cfe-commits
On Fri, Apr 27, 2018 at 4:36 PM Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On 27 April 2018 at 16:07, Sanjay Patel via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Missing dash corrected at r331057. I can improve the doc wording, but >> let's settle on the

[PATCH] D45416: [analyzer] ExprEngine: model GCC inline asm rvalue cast outputs

2018-04-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: test/Analysis/asm.cpp:9 + ref = 1; + __asm__("" : "=r"((int)global)); // don't crash on rvalue output operand + clang_analyzer_eval(global == 1); // expected-warning{{UNKNOWN}} Ugh, do we really need to support this

  1   2   >