[PATCH] D49838: [AST] Sink 'part of explicit cast' down into ImplicitCastExpr

2018-07-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added reviewers: rsmith, rjmccall, erichkeane, aaron.ballman. lebedev.ri added a project: clang. lebedev.ri added a dependency: D49508: [Sema] Mark implicitly-inserted ICE's as being part of explicit cast (PR38166). As discussed in IRC with @rsmith, it

[PATCH] D49627: [CFG] [analyzer] Constructors of member CXXOperatorCallExpr's argument 0 are not argument constructors.

2018-07-26 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. "Actually supporting such this-argument construction contexts would address the FIXME that we've added in https://reviews.llvm.org/D32642 but this patch doesn't go that far." Maybe a FIXME here so we do not forget to continue it in the future? https://revie

[PATCH] D49627: [CFG] [analyzer] Constructors of member CXXOperatorCallExpr's argument 0 are not argument constructors.

2018-07-26 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. How much different is a correct `this`-argument construction context from real argument construction contexts? https://reviews.llvm.org/D49627 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.

[PATCH] D49650: Targets/AMDGPU: Don't set fp32-denormals feature for r600

2018-07-26 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In https://reviews.llvm.org/D49650#1175461, @jvesely wrote: > In https://reviews.llvm.org/D49650#1175438, @arsenm wrote: > > > According to cayman manual, these registers do exist so we should probably > > just make the feature accepted on r600 as well > > > sure, that's

[PATCH] D49833: [clangd] Receive compilationDatabasePath in 'initialize' request

2018-07-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Not strictly opposed to this change, but should any reason why the clients can't guarantee they'll send didChangeConfiguration right after clangd is initialized? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49833

[PATCH] D49783: [clangd] Do not rebuild AST if inputs have not changed

2018-07-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 157434. ilya-biryukov added a comment. - Move OldPreamble.reset() out of the lock, add a comment Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49783 Files: clangd/TUScheduler.cpp test/clangd/extra-flags.test unittests/clangd/TU

[clang-tools-extra] r338012 - [clangd] Do not rebuild AST if inputs have not changed

2018-07-26 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Thu Jul 26 02:21:07 2018 New Revision: 338012 URL: http://llvm.org/viewvc/llvm-project?rev=338012&view=rev Log: [clangd] Do not rebuild AST if inputs have not changed Summary: If the contents are the same, the update most likely comes from the fact that compile commands we

[PATCH] D49783: [clangd] Do not rebuild AST if inputs have not changed

2018-07-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/TUScheduler.cpp:360 std::lock_guard Lock(Mutex); + OldPreamble.reset(); if (NewPreamble) ioeric wrote: > ilya-biryukov wrote: > > ioeric wrote: > > > Why reset? > > We don't need the old p

[PATCH] D49783: [clangd] Do not rebuild AST if inputs have not changed

2018-07-26 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL338012: [clangd] Do not rebuild AST if inputs have not changed (authored by ibiryukov, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D49783 File

[PATCH] D49783: [clangd] Do not rebuild AST if inputs have not changed

2018-07-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D49783#1175688, @simark wrote: > Thanks, that's simple and efficient. I'll update > https://reviews.llvm.org/D49267 (to call `reparseOpenFiles` once again) once > this is merged. LG, thanks! Repository: rL LLVM https://reviews.l

[PATCH] D49228: [analyzer][UninitializedObjectChecker] Void pointer objects are casted back to their dynmic type in note message

2018-07-26 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: test/Analysis/cxx-uninitialized-object-ptr-ref.cpp:290 struct IntDynTypedVoidPointerTest1 { - void *vptr; // expected-note{{uninitialized pointee 'this->vptr'}} + void *vptr; // expected-note{{uninitialized pointee 'this->static_ca

[PATCH] D49546: [clangd] Proof-of-concept query iterators for Dex symbol index

2018-07-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 157439. kbobyrev added a comment. Typo: "Returns false if ..., false otherwise" ->"Returns false if ..., true otherwise". https://reviews.llvm.org/D49546 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/dex/Iterator.cpp

[PATCH] D49546: [clangd] Proof-of-concept query iterators for Dex symbol index

2018-07-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 157438. kbobyrev marked 30 inline comments as done. kbobyrev added a comment. Addressed a round of comments: cleaned up the code, improved documentation and properly introduced such terms like Posting List and Query Tree. Tests are now more modular and each

[clang-tools-extra] r338015 - [clangd] Give an example for symbol-builder usage

2018-07-26 Thread Kirill Bobyrev via cfe-commits
Author: omtcyfz Date: Thu Jul 26 02:41:24 2018 New Revision: 338015 URL: http://llvm.org/viewvc/llvm-project?rev=338015&view=rev Log: [clangd] Give an example for symbol-builder usage `global-symbol-builder` help message mentions `-executor=` option, but doesn't give any example of what the value

[PATCH] D49785: [clangd] Give an example for global-symbol-builder usage

2018-07-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL338015: [clangd] Give an example for symbol-builder usage (authored by omtcyfz, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D49785?vs=15726

[PATCH] D49840: [AST] Add MatchFinder::matchSubtree

2018-07-26 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: klimek, aprantl, pcc, sbenza, Prazek, dblaikie, balazske, xazax.hun. Herald added subscribers: cfe-commits, dkrupp, rnkovacs. Add matchSubtree, so we can traverse on a subtree rooted on a specific node. Currently, we can match **one** node

[PATCH] D49725: [OpenCL] Forbid size dependent types used as kernel arguments

2018-07-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaDecl.cpp:8267 - S.Diag(PD->getLocation(), diag::note_within_field_of_type) -<< PD->getDeclName(); + S.Diag(OrigRecDecl->getLocation(), diag::note_within_field_of_type) + << OrigRecDecl->getDecl

[PATCH] D47196: [Time-report ](2): Recursive timers in Clang

2018-07-26 Thread Andrew V. Tischenko via Phabricator via cfe-commits
avt77 added a comment. Ping! efriedma, do you have any other comments/requirements? https://reviews.llvm.org/D47196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49793: [AArch64] - return address signing

2018-07-26 Thread Luke Cheeseman via Phabricator via cfe-commits
LukeCheeseman updated this revision to Diff 157444. LukeCheeseman added a comment. Change codegen option partial to non-leaf to match msign-return-address scope values https://reviews.llvm.org/D49793 Files: include/clang/Driver/Options.td include/clang/Frontend/CodeGenOptions.def include

[PATCH] D49840: [AST] Add MatchFinder::matchSubtree

2018-07-26 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Usually we use match(anyOf(node), hasDescendant(node)). Or did I misunderstand what you want? Repository: rC Clang https://reviews.llvm.org/D49840 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.

[PATCH] D49546: [clangd] Proof-of-concept query iterators for Dex symbol index

2018-07-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 157447. kbobyrev added a comment. Rebase on top of https://reviews.llvm.org/rL337901 https://reviews.llvm.org/D49546 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/dex/Iterator.cpp clang-tools-extra/clangd/index/dex/Ite

[PATCH] D49546: [clangd] Proof-of-concept query iterators for Dex symbol index

2018-07-26 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lg! just a few nits. Comment at: clang-tools-extra/clangd/index/dex/Iterator.cpp:109 +private: + /// Restores class invariants: each child should point to the same element.

[PATCH] D48903: [VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name

2018-07-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Many thanks! Great cleanup. Just a few nits and we're good to go Comment at: lib/Basic/VirtualFileSystem.cpp:475 InMemoryNodeKind Kind; + Status Stat; + NIT: maybe keep the order of members the same to keep the patch more focu

[PATCH] D49793: [AArch64] - return address signing

2018-07-26 Thread Luke Cheeseman via Phabricator via cfe-commits
LukeCheeseman added inline comments. Comment at: include/clang/Frontend/CodeGenOptions.h:114 +Partial,// Sign the return address of functions that spill LR +All // Sign the return address of all functions + }; kcc wrote: > what's the

[PATCH] D49546: [clangd] Proof-of-concept query iterators for Dex symbol index

2018-07-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 157450. kbobyrev marked 10 inline comments as done. kbobyrev added a comment. Address post-lg round of comments. https://reviews.llvm.org/D49546 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/dex/Iterator.cpp clang-tool

[PATCH] D49546: [clangd] Proof-of-concept query iterators for Dex symbol index

2018-07-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE338017: [clangd] Proof-of-concept query iterators for Dex symbol index (authored by omtcyfz, committed by ). Changed prior to commit: https://reviews.llvm.org/D49546?vs=157450&id=157451#toc Repositor

[clang-tools-extra] r338017 - [clangd] Proof-of-concept query iterators for Dex symbol index

2018-07-26 Thread Kirill Bobyrev via cfe-commits
Author: omtcyfz Date: Thu Jul 26 03:42:31 2018 New Revision: 338017 URL: http://llvm.org/viewvc/llvm-project?rev=338017&view=rev Log: [clangd] Proof-of-concept query iterators for Dex symbol index This patch introduces three essential types of query iterators: `DocumentIterator`, `AndIterator`, `

[PATCH] D49840: [AST] Add MatchFinder::matchSubtree

2018-07-26 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > Usually we use match(anyOf(node), hasDescendant(node)). Or did I > misunderstand what you want? My understanding is that, the free function template `match` uses `MatchFinder::matchAST`, which will start the traverse from the TranslationUnitDecl. And there is no opti

[PATCH] D49736: [Basic] Emit warning flag suggestion only in case there's existing flag *similar* to the unknown one

2018-07-26 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. I like that idea! It looks like it's living in a wrong place anyway as it doesn't need access to any of implementation details (private members) of DiagnosticID. I would still like to preserve it as a function so this block of code has clear semantics and interface. Ho

[PATCH] D49797: [clang-format] Indent after breaking Javadoc annotated line

2018-07-26 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 157452. krasimir added a comment. - Update tests Repository: rC Clang https://reviews.llvm.org/D49797 Files: lib/Format/BreakableToken.cpp lib/Format/BreakableToken.h lib/Format/ContinuationIndenter.cpp unittests/Format/FormatTestComments.cpp

[PATCH] D49844: [AST] Add a isActuallyImplicitCast() helper to the CastExpr class.

2018-07-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added reviewers: rsmith, erichkeane, rjmccall, aaron.ballman. Herald added a subscriber: cfe-commits. lebedev.ri added a dependency: D49838: [AST] Sink 'part of explicit cast' down into ImplicitCastExpr. This is mostly factored out of https://reviews.l

r338020 - [analyzer] Fixed method to get APSInt model

2018-07-26 Thread Mikhail R. Gadelha via cfe-commits
Author: mramalho Date: Thu Jul 26 04:17:13 2018 New Revision: 338020 URL: http://llvm.org/viewvc/llvm-project?rev=338020&view=rev Log: [analyzer] Fixed method to get APSInt model Summary: This patch replaces the current method of getting an `APSInt` from Z3's model by calling generic API method

[PATCH] D48958: [clang][ubsan] Implicit Cast Sanitizer - integer truncation - clang part

2018-07-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 157458. lebedev.ri marked an inline comment as done. lebedev.ri added a reviewer: erichkeane. lebedev.ri added a subscriber: erichkeane. lebedev.ri added a comment. Address @rsmith & @erichkeane [IRC] review notes: - https://reviews.llvm.org/D49838 - [AST]

[PATCH] D48958: [clang][ubsan] Implicit Cast Sanitizer - integer truncation - clang part

2018-07-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: test/CodeGenCXX/catch-implicit-integer-truncations.cpp:8-33 +// == // +// Check that explicit cast does not interfere with implicit cast +//

[clang-tools-extra] r338021 - [clangd] Fix (most) naming warnings from clang-tidy. NFC

2018-07-26 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Thu Jul 26 05:05:31 2018 New Revision: 338021 URL: http://llvm.org/viewvc/llvm-project?rev=338021&view=rev Log: [clangd] Fix (most) naming warnings from clang-tidy. NFC Modified: clang-tools-extra/trunk/clangd/ClangdUnit.cpp clang-tools-extra/trunk/clangd/ClangdUni

[PATCH] D49797: [clang-format] Indent after breaking Javadoc annotated line

2018-07-26 Thread Martin Probst via Phabricator via cfe-commits
mprobst added inline comments. Comment at: lib/Format/BreakableToken.cpp:526 + 0, Content[LineIndex].find_first_of(Blanks)); + if (FirstWord == "@param") +return Style.ContinuationIndentWidth; Shouldn't this check the set above? Comme

[PATCH] D49848: Parse a possible trailing postsfix expression suffix after a fold expression

2018-07-26 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete created this revision. Rakete added a reviewer: rsmith. This patch allows the parsing of a postfix expression involving a fold expression, which is legal as a fold-expression is a primary-expression. See also https://llvm.org/pr38282 Repository: rC Clang https://reviews.llvm.

[PATCH] D48903: [VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name

2018-07-26 Thread Simon Marchi via Phabricator via cfe-commits
simark marked 7 inline comments as done. simark added inline comments. Comment at: lib/Basic/VirtualFileSystem.cpp:475 InMemoryNodeKind Kind; + Status Stat; + ilya-biryukov wrote: > NIT: maybe keep the order of members the same to keep the patch more focused?

[PATCH] D48903: [VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name

2018-07-26 Thread Simon Marchi via Phabricator via cfe-commits
simark updated this revision to Diff 157467. simark marked an inline comment as done. simark added a comment. I think this addresses all of Ilya's comments. Repository: rC Clang https://reviews.llvm.org/D48903 Files: lib/Basic/FileManager.cpp lib/Basic/VirtualFileSystem.cpp unittests/B

[PATCH] D49723: [OpenCL] Check for invalid kernel arguments in array types

2018-07-26 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic updated this revision to Diff 157470. asavonic added a comment. Moved another chunk from https://reviews.llvm.org/D49725 Repository: rC Clang https://reviews.llvm.org/D49723 Files: lib/Sema/SemaDecl.cpp test/SemaOpenCL/invalid-kernel-parameters.cl Index: test/SemaOpenCL/invali

[PATCH] D49725: [OpenCL] Forbid size dependent types used as kernel arguments

2018-07-26 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic updated this revision to Diff 157471. asavonic added a comment. Moved unrelated change to https://reviews.llvm.org/D49723. Repository: rC Clang https://reviews.llvm.org/D49725 Files: lib/Sema/SemaDecl.cpp test/SemaOpenCL/invalid-kernel-parameters.cl Index: test/SemaOpenCL/inval

[PATCH] D49850: [ASTMatchers] fix the missing documentation for new decltypeType matcher

2018-07-26 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth created this revision. JonasToth added reviewers: alexfh, aaron.ballman. Herald added a subscriber: cfe-commits. Regenerate the Matchers documentation, forgotten in the original patch. Repository: rC Clang https://reviews.llvm.org/D49850 Files: docs/LibASTMatchersReference.html

[PATCH] D49725: [OpenCL] Forbid size dependent types used as kernel arguments

2018-07-26 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic marked an inline comment as done. asavonic added inline comments. Comment at: lib/Sema/SemaDecl.cpp:8267 - S.Diag(PD->getLocation(), diag::note_within_field_of_type) -<< PD->getDeclName(); + S.Diag(OrigRecDecl->getLocation(), diag::note_within_field_o

[PATCH] D49850: [ASTMatchers] fix the missing documentation for new decltypeType matcher

2018-07-26 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 -- this sort of change can have post-commit review, btw. Repository: rC Clang https://reviews.llvm.org/D49850 ___ cfe-commi

[PATCH] D49851: [clang-tidy] run-clang-tidy add synchronisation to the output

2018-07-26 Thread Andi via Phabricator via cfe-commits
Abpostelnicu created this revision. Abpostelnicu added a project: clang-tools-extra. Herald added subscribers: cfe-commits, xazax.hun. The goal of this patch is to add synchronisation of the output of the tool with the actual files that are verified. Without it the output of clang-tidy will get

[PATCH] D49850: [ASTMatchers] fix the missing documentation for new decltypeType matcher

2018-07-26 Thread Jonas Toth via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC338022: [ASTMatchers] fix the missing documentation for new decltypeType matcher (authored by JonasToth, committed by ). Changed prior to commit: https://reviews.llvm.org/D49850?vs=157474&id=157475#toc

[PATCH] D49850: [ASTMatchers] fix the missing documentation for new decltypeType matcher

2018-07-26 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 157474. JonasToth added a comment. rebase Repository: rC Clang https://reviews.llvm.org/D49850 Files: docs/LibASTMatchersReference.html Index: docs/LibASTMatchersReference.html === ---

r338022 - [ASTMatchers] fix the missing documentation for new decltypeType matcher

2018-07-26 Thread Jonas Toth via cfe-commits
Author: jonastoth Date: Thu Jul 26 06:02:05 2018 New Revision: 338022 URL: http://llvm.org/viewvc/llvm-project?rev=338022&view=rev Log: [ASTMatchers] fix the missing documentation for new decltypeType matcher Summary: Regenerate the Matchers documentation, forgotten in the original patch. Review

r338024 - Allow thread safety annotation lock upgrading and downgrading.

2018-07-26 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Thu Jul 26 06:03:16 2018 New Revision: 338024 URL: http://llvm.org/viewvc/llvm-project?rev=338024&view=rev Log: Allow thread safety annotation lock upgrading and downgrading. Patch thanks to Aaron Puchert! Modified: cfe/trunk/lib/Analysis/ThreadSafety.cpp cfe/t

[PATCH] D49355: Thread safety analysis: Allow lock upgrading and downgrading

2018-07-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. I've commit in r338024, thank you for the patch! Repository: rC Clang https://reviews.llvm.org/D49355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org

[PATCH] D49838: [AST] Sink 'part of explicit cast' down into ImplicitCastExpr

2018-07-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. 2 small items, otherwise looks good. Comment at: include/clang/AST/Expr.h:2824 CastExprBits.Kind = kind; -CastExprBits.PartOfExplicitCast = false; setBasePathSize(BasePathSize); So, I'd prefer that this line get left in

[clang-tools-extra] r338025 - [clang-tidy] Fix llvm.org/PR38315 (support type aliases in modernize-shrink-to-fit)

2018-07-26 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu Jul 26 06:13:54 2018 New Revision: 338025 URL: http://llvm.org/viewvc/llvm-project?rev=338025&view=rev Log: [clang-tidy] Fix llvm.org/PR38315 (support type aliases in modernize-shrink-to-fit) Modified: clang-tools-extra/trunk/clang-tidy/modernize/ShrinkToFitCheck.cpp

[PATCH] D49838: [AST] Sink 'part of explicit cast' down into ImplicitCastExpr

2018-07-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D49838#1176622, @erichkeane wrote: > 2 small items, otherwise looks good. Thank you for taking a look! Comment at: include/clang/AST/Expr.h:2824 CastExprBits.Kind = kind; -CastExprBits.PartOfExplicitCast = fals

[PATCH] D49844: [AST] Add a isActuallyImplicitCast() helper to the CastExpr class.

2018-07-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I'm not sure that this logic requires a separate function. Since you've fixed the getIsPartOfExplicitCast logic correctly, it is pretty simple... Comment at: include/clang/AST/Expr.h:2854 + /// There are two global types of casts - implicit and ex

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-26 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. I did not find any major issue :) Comment at: clang-tidy/readability/MagicNumbersCheck.cpp:20 +bool isUsedToInitializeAConstant( +const clang::ast_matchers::MatchFinder::MatchResult &Result, +const clang::ast_type_traits::DynTypedNode &Node) {

[PATCH] D48958: [clang][ubsan] Implicit Cast Sanitizer - integer truncation - clang part

2018-07-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. 1 Nit, otherwise LGTM. Comment at: docs/UndefinedBehaviorSanitizer.rst:95 + of bigger bit width to smaller bit width, if that results in data loss. + That is, if the demoted value, after casting back to the

[PATCH] D45444: [clang-tidy] implement new check for const-correctness

2018-07-26 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. @aaron.ballman Are you missing something in this check/tests? I think i will remove the big comment with my thoughts on what has to be done, or do you think it would help for reference? I would probably be able to finalize this week if there is no major issue, so it

[PATCH] D49729: [AST][1/4] Move the bit-fields from TagDecl, EnumDecl and RecordDecl into DeclContext

2018-07-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: include/clang/AST/Decl.h: + + /// True if this is a C++11 scoped enumeration. + void setScopedUsingClassTag(bool ScopedUCT = true) { This is the same comment as 3330, perhaps a copy/paste error? ==

[clang-tools-extra] r338028 - [clangd] Fix unit tests for Dex

2018-07-26 Thread Kirill Bobyrev via cfe-commits
Author: omtcyfz Date: Thu Jul 26 07:00:00 2018 New Revision: 338028 URL: http://llvm.org/viewvc/llvm-project?rev=338028&view=rev Log: [clangd] Fix unit tests for Dex Iterators took temporary objects in constructors, objects were invalidated when built with recent Clang which resulted in crashes.

[PATCH] D49800: [clang-tidy: modernize] modernize-redundant-void-arg crashes when a function body is in a macro

2018-07-26 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. Thank you for working on this! Comment at: clang-tidy/modernize/RedundantVoidArgCheck.cpp:241 +SourceLocation End = +Lambda->getBody()->getLocStart().is

[PATCH] D49852: [Modules] Do not emit relocation error when -fno-validate-pch is set

2018-07-26 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi created this revision. yamaguchi added reviewers: rsmith, dblaikie, v.g.vassilev. Clang emits error when implicit modules was relocated from the first build directory. However this was biting our usecase where we copy the contents of build directory to another directory in order to distr

[PATCH] D46190: For a used declaration, mark any associated usings as referenced.

2018-07-26 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added a comment. @rsmith & @probinson, Is there anything I can add to this patch in order to submit it? This patch is blocking the review https://reviews.llvm.org/D44826 which is already approved. Thanks very much. Comment at: lib/Sema/SemaDeclCXX.cpp:155

[PATCH] D49838: [AST] Sink 'part of explicit cast' down into ImplicitCastExpr

2018-07-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: lib/Sema/SemaCast.cpp:97 while ((CE = dyn_cast(CE->getSubExpr( -CE->setIsPartOfExplicitCast(true); +dyn_cast(CE)->setIsPartOfExplicitCast(true); } lebedev.ri wrote: > erichkeane wrote:

[PATCH] D49838: [AST] Sink 'part of explicit cast' down into ImplicitCastExpr

2018-07-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 157483. lebedev.ri marked 5 inline comments as done. lebedev.ri added a comment. Address @erichkeane review notes. Repository: rC Clang https://reviews.llvm.org/D49838 Files: include/clang/AST/Expr.h include/clang/AST/Stmt.h lib/AST/ASTDumper.cp

[PATCH] D49844: [AST] Add a isActuallyImplicitCast() helper to the CastExpr class.

2018-07-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 157484. lebedev.ri marked 2 inline comments as done. lebedev.ri added a comment. Comment fine-tuning. In https://reviews.llvm.org/D49844#1176639, @erichkeane wrote: > I'm not sure that this logic requires a separate function. Since you've > fixed the ge

[PATCH] D49844: [AST] Add a isActuallyImplicitCast() helper to the CastExpr class.

2018-07-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. This revision is now accepted and ready to land. If @rsmith requested this, I'm fine with it then. Repository: rC Clang https://reviews.llvm.org/D49844 ___ cfe-commits mailing list cf

r338032 - [OPENMP] Force OpenMP 4.5 when compiling for offloading.

2018-07-26 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Thu Jul 26 08:17:38 2018 New Revision: 338032 URL: http://llvm.org/viewvc/llvm-project?rev=338032&view=rev Log: [OPENMP] Force OpenMP 4.5 when compiling for offloading. If the user requested compilation for OpenMP with the offloading support, force the version of the OpenMP

[PATCH] D49725: [OpenCL] Forbid size dependent types used as kernel arguments

2018-07-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks! Repository: rC Clang https://reviews.llvm.org/D49725 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.o

[PATCH] D48958: [clang][ubsan] Implicit Cast Sanitizer - integer truncation - clang part

2018-07-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: docs/UndefinedBehaviorSanitizer.rst:93-97 + - ``-fsanitize=implicit-integer-truncation``: Implicit cast from integer + of bigger bit width to smaller bit width, if that results in data loss. + That is, if the demoted valu

[PATCH] D48958: [clang][ubsan] Implicit Cast Sanitizer - integer truncation - clang part

2018-07-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 157498. lebedev.ri marked 2 inline comments as done. lebedev.ri added a comment. Small rewording in `docs/UndefinedBehaviorSanitizer.rst` thanks to @erichkeane & @aaron.ballman! Repository: rC Clang https://reviews.llvm.org/D48958 Files: docs/Relea

[PATCH] D48958: [clang][ubsan] Implicit Cast Sanitizer - integer truncation - clang part

2018-07-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: docs/UndefinedBehaviorSanitizer.rst:93-97 + - ``-fsanitize=implicit-integer-truncation``: Implicit cast from integer + of bigger bit width to smaller bit width, if that results in data loss. + That is, if the demoted value,

[PATCH] D49736: [Basic] Emit warning flag suggestion only in case there's existing flag *similar* to the unknown one

2018-07-26 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Sounds good Repository: rC Clang https://reviews.llvm.org/D49736 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49523: [clangd] Add support for per-file override compilation command

2018-07-26 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D49523#1174627, @ilya-biryukov wrote: > In https://reviews.llvm.org/D49523#1174086, @arphaman wrote: > > > We actually need both mechanisms. I posted the didChangeConfiguration > > extension to https://reviews.llvm.org/D49758. > > > Why do we

[PATCH] D49523: [clangd] Add support for per-file override compilation command

2018-07-26 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman abandoned this revision. arphaman added a comment. Abandoned in favor of https://reviews.llvm.org/D49758 (will update it today). Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49523 ___ cfe-commits mailing list cfe-commits@

[PATCH] D48903: [VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name

2018-07-26 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 Repository: rC Clang https://reviews.llvm.org/D48903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

[clang-tools-extra] r338037 - [clangd] Use 'const Twine&' instead of 'Twine'. NFC

2018-07-26 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Thu Jul 26 09:13:52 2018 New Revision: 338037 URL: http://llvm.org/viewvc/llvm-project?rev=338037&view=rev Log: [clangd] Use 'const Twine&' instead of 'Twine'. NFC To fix clang-tidy warning Modified: clang-tools-extra/trunk/clangd/Threading.cpp clang-tools-extra/t

[PATCH] D49862: [clang-tidy] Fix a crash in fuchsia-multiple-inheritance

2018-07-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added reviewers: juliehockett, ioeric, hokein, aaron.ballman. Herald added a subscriber: xazax.hun. See the test case for a repro. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49862 Files: clang-tidy/fuchsia/MultipleInherit

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-26 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:115 + make_unique(M.get()); + FPasses->add(createTargetTransformInfoWrapperPass(TargetIRAnalysis())); + emmettneyman wrote: > morehouse wrote: > > morehouse wr

[PATCH] D48027: [analyzer] Improve `CallDescription` to handle c++ method.

2018-07-26 Thread Henry Wong via Phabricator via cfe-commits
MTC updated this revision to Diff 157499. MTC added a comment. @xazax.hun Thanks for your tips! After some investigation, `MatchFinder::match` just traverse one ASTNode, that means `match(namedDecl(HasNameMatcher()))` and `match(namedDecl(matchesName()))` both not traverse children. So there are

[PATCH] D49863: [istream] Fix error flags and exceptions propagated from input stream operations

2018-07-26 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. This is a very tricky change since it touches all the input stream operations, both formatted and unformatted. However, I think it's an important change as it fixes extremely broken behavior. The paper I'm working on to fix this in the Standard is https://github.com/ld

Re: r338032 - [OPENMP] Force OpenMP 4.5 when compiling for offloading.

2018-07-26 Thread Jonas Hahnfeld via cfe-commits
Hi Alexey, maybe we can now raise the version generally? Is that something that we want to do before branching for 7.0? According to http://clang.llvm.org/docs/OpenMPSupport.html, all directives of OpenMP 4.5 are supported (even if Clang may not generate optimal code). Cheers, Jonas On 2018

[PATCH] D49790: [AST] Small doc update for DeclContext

2018-07-26 Thread Bruno Ricci via Phabricator via cfe-commits
bricci updated this revision to Diff 157505. bricci edited the summary of this revision. bricci added a comment. Re-added the "friend class ASTWriter" after making hasNeedToReconcileExternalVisibleStorage, hasLazyLocalLexicalLookups and hasLazyExternalLexicalLookups in DeclContext private. This m

r338041 - [CodeGen][ObjC] Make block copy/dispose helper functions exception-safe.

2018-07-26 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Jul 26 09:51:21 2018 New Revision: 338041 URL: http://llvm.org/viewvc/llvm-project?rev=338041&view=rev Log: [CodeGen][ObjC] Make block copy/dispose helper functions exception-safe. When an exception is thrown in a block copy helper function, captured objects that have p

[PATCH] D49718: [CodeGen][ObjC] Make block copy/dispose helper function exception-safe.

2018-07-26 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC338041: [CodeGen][ObjC] Make block copy/dispose helper functions exception-safe. (authored by ahatanak, committed by ). Changed prior to commit: https://reviews.llvm.org/D49718?vs=157395&id=157514#toc

[PATCH] D49864: The script clang-tidy-diff.py doesn't accept 'pass by' options (--)

2018-07-26 Thread Jano Simas via Phabricator via cfe-commits
janosimas created this revision. janosimas added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. When the argument -- is passed to clang-tidy-diff.py it should pass the following arguments to clang-tidy. It does that but also includes -- as an argument, there should be a +1

[PATCH] D49589: [UBSan] Strengthen pointer checks in 'new' expressions

2018-07-26 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 157519. sepavloff added a comment. Updated patch Now information, if sanitizer checks are generated while processing 'new' expression, is passed through function call arguments. Repository: rC Clang https://reviews.llvm.org/D49589 Files: lib/CodeGen

[PATCH] D49701: [ASTMatchers] Introduce a matcher for `ObjCIvarExpr`, support getting it's declaration

2018-07-26 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:44 #include "clang/AST/Expr.h" +#include "clang/AST/ExprObjC.h" #include "clang/AST/ExprCXX.h" aaron.ballman wrote: > This list should remain sorted alphab

[PATCH] D49701: [ASTMatchers] Introduce a matcher for `ObjCIvarExpr`, support getting it's declaration

2018-07-26 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov updated this revision to Diff 157520. https://reviews.llvm.org/D49701 Files: clang/docs/LibASTMatchersReference.html clang/include/clang/ASTMatchers/ASTMatchers.h clang/include/clang/ASTMatchers/ASTMatchersInternal.h clang/lib/ASTMatchers/ASTMatchersInternal.cpp clang/l

[PATCH] D49865: Inform the AST of #pragma FENV_ACCESS use

2018-07-26 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn created this revision. kpn added reviewers: rsmith, craig.topper, hfinkel. Herald added a subscriber: cfe-commits. We have in place support for parsing #pragma FENV_ACCESS, but that information is then discarded with a warning to the user that we don't support it. This patch gets us one step

[PATCH] D49589: [UBSan] Strengthen pointer checks in 'new' expressions

2018-07-26 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. > Also, please remember that your analysis is not the only thing happening in > the compiler. isChecked is not a meaningful name taken out of context. `Address` is not modified in the current patch version. As for `AggValueSlot`, this method name is leaved, as there

Re: [clang-tools-extra] r338017 - [clangd] Proof-of-concept query iterators for Dex symbol index

2018-07-26 Thread Jeremy Morse via cfe-commits
[Resending with cfe-commits@, whoops] Hi Kirill, We believe this patch might be breaking one of the buildbots: http://lab.llvm.org:8011/builders/clang-x86_64-linux- abi-test/builds/29719 Which is complaining about the std::unique_ptr copy constructor being called in DexIndexTests.cpp. It s

[PATCH] D49729: [AST][1/4] Move the bit-fields from TagDecl, EnumDecl and RecordDecl into DeclContext

2018-07-26 Thread Bruno Ricci via Phabricator via cfe-commits
bricci updated this revision to Diff 157522. bricci marked 2 inline comments as done. bricci added a comment. - Re-based: r337978 [ODRHash] Support hashing enums added an ODRHash to EnumDecl which conflicts with these changes. The corresponding flag HasODRHash has been put into EnumDeclBitfields

[PATCH] D49770: [ARM64] [Windows] Follow MS X86_64 C++ ABI when passing structs

2018-07-26 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. Please avoid the extra enum case, and commit. Comment at: include/clang/Basic/TargetInfo.h:1223 enum CallingConvKind { CCK_Default, This is poorly named. I'll try to send a patch to rename it after this l

r338045 - [RISCV] Add support for interrupt attribute

2018-07-26 Thread Ana Pazos via cfe-commits
Author: apazos Date: Thu Jul 26 10:37:45 2018 New Revision: 338045 URL: http://llvm.org/viewvc/llvm-project?rev=338045&view=rev Log: [RISCV] Add support for interrupt attribute Summary: Clang supports the GNU style ``__attribute__((interrupt))`` attribute on RISCV targets. Permissible values f

[PATCH] D48412: [RISCV] Add support for interrupt attribute

2018-07-26 Thread Ana Pazos via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC338045: [RISCV] Add support for interrupt attribute (authored by apazos, committed by ). Herald added a subscriber: jrtc27. Repository: rC Clang https://reviews.llvm.org/D48412 Files: include/clang

r338048 - [Sema][ObjC] Do not propagate the nullability specifier on the receiver

2018-07-26 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Jul 26 10:51:13 2018 New Revision: 338048 URL: http://llvm.org/viewvc/llvm-project?rev=338048&view=rev Log: [Sema][ObjC] Do not propagate the nullability specifier on the receiver to the result type of a message send if the result type cannot have a nullability specifier

r338049 - [OPENMP] What's new for OpenMP in clang.

2018-07-26 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Thu Jul 26 10:53:45 2018 New Revision: 338049 URL: http://llvm.org/viewvc/llvm-project?rev=338049&view=rev Log: [OPENMP] What's new for OpenMP in clang. Updated ReleaseNotes + Status of the OpenMP support in clang. Modified: cfe/trunk/docs/OpenMPSupport.rst cfe/trun

[PATCH] D49848: Parse a possible trailing postfix expression suffix after a fold expression

2018-07-26 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Shouldn't the caller of ParseParenExpression already be doing this? Repository: rC Clang https://reviews.llvm.org/D49848 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinf

Re: r338049 - [OPENMP] What's new for OpenMP in clang.

2018-07-26 Thread Jonas Hahnfeld via cfe-commits
Hi Alexey, On 2018-07-26 19:53, Alexey Bataev via cfe-commits wrote: Author: abataev Date: Thu Jul 26 10:53:45 2018 New Revision: 338049 URL: http://llvm.org/viewvc/llvm-project?rev=338049&view=rev Log: [OPENMP] What's new for OpenMP in clang. Updated ReleaseNotes + Status of the OpenMP suppor

r338050 - [COFF, ARM64] Decide when to mark struct returns as SRet

2018-07-26 Thread Mandeep Singh Grang via cfe-commits
Author: mgrang Date: Thu Jul 26 11:07:59 2018 New Revision: 338050 URL: http://llvm.org/viewvc/llvm-project?rev=338050&view=rev Log: [COFF, ARM64] Decide when to mark struct returns as SRet Summary: Refer the MS ARM64 ABI Convention for the behavior for struct returns: https://docs.microsoft.com/

  1   2   >