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

2018-08-05 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. In https://reviews.llvm.org/D49355#1188603, @phosek wrote: > In https://reviews.llvm.org/D49355#1188520, @aaronpuchert wrote: > > > Could you explain what annotations like `LOCK_UNLOCK` are useful for? What > > do they check? The annotation should certainly not be

r338966 - [AST][NFC] Remove unneeded forward declarations in Type.h

2018-08-05 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Sun Aug 5 02:48:59 2018 New Revision: 338966 URL: http://llvm.org/viewvc/llvm-project?rev=338966=rev Log: [AST][NFC] Remove unneeded forward declarations in Type.h These forward declarations for various classes in the Type hierarchy are not needed since they are all

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

2018-08-05 Thread Abramo Bagnara via cfe-commits
Il 01/08/2018 22:48, Erich Keane via cfe-commits ha scritto: > Author: erichkeane > Date: Wed Aug 1 13:48:16 2018 > New Revision: 338630 > > URL: http://llvm.org/viewvc/llvm-project?rev=338630=rev > Log: > [AST][1/4] Move the bit-fields from TagDecl, EnumDecl and RecordDecl into > DeclContext >

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

2018-08-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I think this is close. If @alexfh doesn't chime in on the open question in the next few days, I would say the check is ready to go in and we can address the open question in follow-up commits. Comment at:

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

2018-08-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I'm sorry for the delay in reviewing this; I'm not certain how it fell off my radar for so long! Comment at: clang-tidy/cppcoreguidelines/ConstCheck.cpp:32 + * + * Handle = either a pointer or reference + * Value = everything else (Type

[PATCH] D50307: [clang-rename] make clang-rename.py vim integration python3 compatible

2018-08-05 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth created this revision. JonasToth added reviewers: arphaman, klimek. Herald added a subscriber: cfe-commits. This patch makes the clang-rename.py script useable for vim with only python3 support. It uses the print-function and adjust the doc slightly to mention the correct python3

[PATCH] D50307: [clang-rename] make clang-rename.py vim integration python3 compatible

2018-08-05 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 159209. JonasToth added a comment. - remove double blank line Repository: rC Clang https://reviews.llvm.org/D50307 Files: tools/clang-rename/clang-rename.py Index: tools/clang-rename/clang-rename.py

[PATCH] D50241: Fix tests for changed opt remarks format

2018-08-05 Thread Dávid Bolvanský via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC338971: Fix tests for changed opt remarks format (authored by xbolva00, committed by ). Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D50241 Files:

[PATCH] D50250: [clang][ubsan] Implicit Conversion Sanitizer - integer sign change - clang part

2018-08-05 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: lib/CodeGen/CGExprScalar.cpp:1129-1130 + return; + } + // That's it. We can't rule out any more cases with the data we have. Actually, after messing with souper a little, if we are converting from *larger*

r338971 - Fix tests for changed opt remarks format

2018-08-05 Thread David Bolvansky via cfe-commits
Author: xbolva00 Date: Sun Aug 5 07:53:34 2018 New Revision: 338971 URL: http://llvm.org/viewvc/llvm-project?rev=338971=rev Log: Fix tests for changed opt remarks format Summary: Optimization remark format is slightly changed by LLVM patch D49412. Two tests are fixed with expected messages

[PATCH] D50099: [DebugInfo][OpenCL] Address post-commit review of D49930

2018-08-05 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. Looks pretty good. Could you pass CGM in and just make the functions static I couldn't see any other class variables, but might have missed something. One inline comment as well. -eric Comment at: lib/CodeGen/CGDebugInfo.cpp:997

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

2018-08-05 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. > I'm sorry for the delay in reviewing this; I'm not certain how it fell off my > radar for so long! No problem :) Comment at: clang-tidy/cppcoreguidelines/ConstCheck.cpp:32 + * + * Handle = either a pointer or reference + * Value = everything

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

2018-08-05 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 159222. 0x8000- added a comment. Address several style comments. Rebase to current trunk (8.0). Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49114 Files: clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp

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

2018-08-05 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/cppcoreguidelines/ConstCorrectnessCheck.cpp:147 + // Example: `int i = 10`, `int i` (will be used if program is correct) + const auto LocalValDecl = varDecl(unless(anyOf( + isLocal(), hasInitializer(anything()),

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

2018-08-05 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 159225. JonasToth marked an inline comment as done. JonasToth added a comment. - fix typo Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45444 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt

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

2018-08-05 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 159226. JonasToth added a comment. - update ReleaseNotes Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45444 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/ConstCorrectnessCheck.cpp

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

2018-08-05 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang-tidy/cppcoreguidelines/ConstCheck.cpp:28 + * For now: Only local variables are considered. Globals/namespace variables, + * paramters and class members are not analyzed. + * Parameters have a check already:

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

2018-08-05 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 159220. JonasToth marked 11 inline comments as done. JonasToth added a comment. - Merge branch 'master' into check_const - [Misc] rename and first review comments - language stuff Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45444

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

2018-08-05 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/cppcoreguidelines/ConstCheck.cpp:141-142 +void ConstCheck::registerMatchers(MatchFinder *Finder) { + if (!getLangOpts().CPlusPlus) +return; + aaron.ballman wrote: > Why is this check disabled for C

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

2018-08-05 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 159221. JonasToth added a comment. - doc list Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45444 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/ConstCorrectnessCheck.cpp

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

2018-08-05 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 159224. JonasToth added a comment. - revert breaking change in LocalVar matcher. Reverting the change from `allOf(...)` to `unless(anyOf(..))`. I did not investigate the reason for it breaking, because basic logic suggests that transformation should be

[PATCH] D41217: [Concepts] Concept Specialization Expressions

2018-08-05 Thread Saar Raz via Phabricator via cfe-commits
saar.raz updated this revision to Diff 159234. saar.raz added a comment. Herald added a subscriber: jfb. - Switch to ASTTemplateArgumentListInfo, add ConstantEvaluated context when parsing constraints Repository: rC Clang https://reviews.llvm.org/D41217 Files:

[PATCH] D41284: [Concepts] Associated constraints infrastructure.

2018-08-05 Thread Saar Raz via Phabricator via cfe-commits
saar.raz updated this revision to Diff 159236. saar.raz added a comment. - Consider requires clause when determining if TPL has an unexpanded pack Repository: rC Clang https://reviews.llvm.org/D41284 Files: include/clang/AST/DeclTemplate.h include/clang/AST/RecursiveASTVisitor.h

[PATCH] D50318: Support Swift in platform availability attribute

2018-08-05 Thread Michael Wu via Phabricator via cfe-commits
michaelwu created this revision. michaelwu added reviewers: manmanren, friss, doug.gregor. This adds support for Swift platform availability attributes. It's largely a port of the changes made to https://github.com/apple/swift-clang/ for Swift availability attributes. Specifically,

[PATCH] D50250: [clang][ubsan] Implicit Conversion Sanitizer - integer sign change - clang part

2018-08-05 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 159230. lebedev.ri added a comment. Do not emit sign-change check in `signed int -> signed char` case. The truncation check is sufficient: https://godbolt.org/g/r1wgQG https://rise4fun.com/Alive/ifj The middle-end [clearly] does not understand that, but

r338979 - [docs] Don't use the `asm` syntax highlighting (which our docs builder

2018-08-05 Thread Chandler Carruth via cfe-commits
Author: chandlerc Date: Sun Aug 5 18:28:42 2018 New Revision: 338979 URL: http://llvm.org/viewvc/llvm-project?rev=338979=rev Log: [docs] Don't use the `asm` syntax highlighting (which our docs builder errors on) and clean up the formattting. This isn't actualy assembly anyways, so dropping the

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

2018-08-05 Thread Simon Marchi via Phabricator via cfe-commits
simark added a comment. In https://reviews.llvm.org/D48903#1188566, @malaperle wrote: > Both check-clang and check-clang-tools pass successfully for me on Windows > with the patch. Awesome, thanks! Repository: rC Clang https://reviews.llvm.org/D48903

[PATCH] D50226: [DebugInfo] Use DbgVariableIntrinsic as the base class of variables.

2018-08-05 Thread Hsiangkai Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL338985: [DebugInfo] Use DbgVariableIntrinsic as the base class of variables. (authored by HsiangKai, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D41569: [Concepts] Constraint enforcement and diagnostics

2018-08-05 Thread Saar Raz via Phabricator via cfe-commits
saar.raz updated this revision to Diff 159242. saar.raz added a comment. Herald added a subscriber: jfb. - Adjusted to switch to ASTTemplateArgumentList Repository: rC Clang https://reviews.llvm.org/D41569 Files: include/clang/AST/ExprCXX.h include/clang/Basic/DiagnosticSemaKinds.td