[PATCH] D63139: [Diagnostics] Implement -Wswitch-unreachable

2019-07-29 Thread JF Bastien via Phabricator via cfe-commits
jfb added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:8192 +def warn_unreachable_stmt_in_switch : Warning< + "statement will be never executed">, InGroup>; def warn_bool_switch_condition : Warning< aaron.ballman wrote: > I thought

[PATCH] D64695: [clang-format] Added new style rule: SortNetBSDIncludes

2019-07-29 Thread Manikishan Ghantasala via Phabricator via cfe-commits
Manikishan added a comment. In D64695#1590948 , @Manikishan wrote: > In D64695#1589818 , @lebedev.ri > wrote: > > > In D64695#1589740 , @Manikishan > > wrote: > > > > > In

[PATCH] D63082: [Diagnostics] Added support for -Wint-in-bool-context

2019-07-29 Thread JF Bastien via Phabricator via cfe-commits
jfb added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:5609 +def warn_mul_in_bool_context : Warning< + "'*' in bool context, maybe you mean '&&'?">, + InGroup; aaron.ballman wrote: > xbolva00 wrote: > > aaron.ballman wrote: > > > I

[PATCH] D64991: [analyzer][WIP] Implement a primitive reaching definitions analysis

2019-07-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/include/clang/Analysis/Analyses/ReachingDefinitions.h:30 + }; + const VarDecl *Var; + CFGBlock::ConstCFGElementRef E; In the future we might also want to reason about `FieldDecl`s. Comment

[PATCH] D65290: [analyzer][NFC] Prove that we only track the evaluated part of the condition

2019-07-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. More tests are always welcome :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65290/new/ https://reviews.llvm.org/D65290 ___ cfe-commits

[PATCH] D65287: [analyzer][CFG] Don't track the condition of asserts

2019-07-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/include/clang/Analysis/CFG.h:860 + /// child CFG blocks in a depth-first manner and see if all paths eventually + /// end up in an immediate sink block. + bool isInevitablySinking() const; Is it obvious what

[PATCH] D65249: [NFC] use C++11 in AlignOf.h, remove AlignedCharArray

2019-07-29 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D65249#1605523 , @rnk wrote: > I have concerns that some of the patches that you landed prior to this will > cause issues with old versions of MSVC, but in isolation, this is fine, and > if anyone complains, we can address it on

[PATCH] D65361: [analyzer] Trust global initializers when analyzing main().

2019-07-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. I like the change. Comment at: clang/lib/StaticAnalyzer/Core/RegionStore.cpp:630 +(const RegionBindings::TreeTy *)((uintptr_t)store & ~(uintptr_t)1), +RBFactory.getTreeFactory(), (bool)((uintptr_t)store & (uintptr_t)1)); }

[PATCH] D65381: [analyzer][NFC] Refactoring BugReporter.cpp P3.: std::shared_pointer -> PathDiagnosticPieceRef

2019-07-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Just wondering, did you check if we actually need shared ownership for this type? If not, do not waste your time checking for now :) Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:244 +

[PATCH] D65349: [analyzer] Be more careful with destructors of non-regions.

2019-07-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This revision is now accepted and ready to land. LG! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65349/new/ https://reviews.llvm.org/D65349 ___

[PATCH] D65379: [analyzer][NFC] Refactoring BugReporter.cpp P2.: Clean up the construction of bug paths and finding a valid report

2019-07-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. Looks good, some nits inline. I agree with Artem, we should consider omitting the trimming and document how to get something similar if desired for debugging. Just a random idea: maybe the original purpose of the trimming was to be

[PATCH] D65378: [analyzer][NFC] Refactoring BugReporter.cpp P1.: Store interesting symbols/regions in a simple set

2019-07-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. LGTM! I also do not see much value in the old code at this point. I would expect PathDiagnosticConsumers to be independent of the interesting symbols/regions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D63932: [GlobalDCE] Dead Virtual Function Elimination

2019-07-29 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. It doesn't seem sound to create the distinction between translation unit and linkage unit visibility and then allow passes to relax visibility. For example, imagine that you have an executable with (compiled with `-fvisibility=default`): struct PluginInterface {

[PATCH] D65182: [analyzer] WIP: Add fix-it hint support.

2019-07-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. The direction looks good to me. I wonder if it is worth to add some warnings somewhere that it is really tricky to come up with reasonable fixits for most path sensitive checks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65182/new/

[PATCH] D65192: [Sema] Disable some enabled-by-default -Wparentheses diagnostics

2019-07-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked 3 inline comments as done. MaskRay added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:5647-5650 def warn_overloaded_shift_in_comparison :Warning< "overloaded operator %select{>>|<<}0 has higher precedence than " "comparison

[PATCH] D65182: [analyzer] WIP: Add fix-it hint support.

2019-07-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D65182#1604280 , @baloghadamsoftware wrote: > Hmm, I was thinking on the same for some time but I wonder how many checkers > could find the correct fixits? Maybe the removal fixits of double frees or > double file closes, but I

[PATCH] D65192: [Sema] Disable some enabled-by-default -Wparentheses diagnostics

2019-07-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 212265. MaskRay edited the summary of this revision. MaskRay added a comment. keep -Woverloaded-shift-op-parentheses enabled by default Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65192/new/ https://reviews.llvm.org/D65192

[PATCH] D65192: [Sema] Disable some enabled-by-default -Wparentheses diagnostics

2019-07-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:5654-5656 def warn_addition_in_bitshift : Warning< "operator '%0' has lower precedence than '%1'; " + "'%1' will be evaluated first">, InGroup,

[PATCH] D64849: Add platform guards to PPC vector intrinsics headers.

2019-07-29 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL367281: [PowerPC] [Clang] Add platform guards to PPC vector intrinsics headers (authored by chaofan, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior

[PATCH] D65239: [analyzer] RangeConstraintManager: Apply constraint ranges of bitwise operations

2019-07-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:496 + // as a bitwise operation result could be null. + if (RS.getConcreteValue() && RS.getConcreteValue()->getExtValue() == 0) +return State; Instead of "we

r367281 - [PowerPC] [Clang] Add platform guards to PPC vector intrinsics headers

2019-07-29 Thread Qiu Chaofan via cfe-commits
Author: chaofan Date: Mon Jul 29 19:18:11 2019 New Revision: 367281 URL: http://llvm.org/viewvc/llvm-project?rev=367281=rev Log: [PowerPC] [Clang] Add platform guards to PPC vector intrinsics headers Move the platform check out of PPC Linux toolchain code and add platform guards to the intrinsic

[PATCH] D65382: [analyzer][NFC] Refactoring BugReporter.cpp P4.: If it can be const, make it const

2019-07-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. It's counter-idiomatic to pass manager objects (`ProgramStateManager`, `SValBuilder`, etc.) as const-references because it tells you pretty much nothing about what you can or cannot do with them. You don't really ever semantically mutate them in the first place. But when

[PATCH] D65426: [Coverage] Hide coverage for regions with incorrect end locations (PR39942)

2019-07-29 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. PTAL: https://reviews.llvm.org/D65428 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65426/new/ https://reviews.llvm.org/D65426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D65428: Remove cache for macro arg stringization

2019-07-29 Thread Reid Kleckner via Phabricator via cfe-commits
rnk created this revision. rnk added reviewers: vsk, rsmith. Herald added a project: clang. The cache recorded the wrong expansion location for all but the first stringization. It seems uncommon to stringize the same macro argument multiple times, so this cache doesn't seem that important. Fixes

[PATCH] D65381: [analyzer][NFC] Refactoring BugReporter.cpp P3.: std::shared_pointer -> PathDiagnosticPieceRef

2019-07-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. > find clang/ -type f -exec sed -i > 's/std::shared_ptr/PathDiagnosticPieceRef/g' {} \; > git diff -U3 --no-color HEAD^ | clang-format-diff -p1 -i All you need to know about the state of C++

[PATCH] D65379: [analyzer][NFC] Refactoring BugReporter.cpp P2.: Clean up the construction of bug paths and finding a valid report

2019-07-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. If only somebody could explain to me why do even need trimming in the first place :/ I was only keeping it around for easier exploded graph dumps reading, but these days we can trivially replace

[PATCH] D65426: [Coverage] Hide coverage for regions with incorrect end locations (PR39942)

2019-07-29 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I did some digging and I figured out where things go wrong. The issue is the repeated string-izing of the macro argument, the repetition of `#func` here. This hacky patch seems to fix the issue: diff --git a/clang/lib/Lex/MacroArgs.cpp b/clang/lib/Lex/MacroArgs.cpp

[PATCH] D65427: [analyzer] exploded-graph-rewriter: Implement Store pointers.

2019-07-29 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. Oh, of course. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65427/new/ https://reviews.llvm.org/D65427 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D65249: [NFC] use C++11 in AlignOf.h, remove AlignedCharArray

2019-07-29 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. I have concerns that some of the patches that you landed prior to this will cause issues with old versions of MSVC, but in isolation, this is fine, and if anyone complains, we can address it on a

[PATCH] D65427: [analyzer] exploded-graph-rewriter: Implement Store pointers.

2019-07-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ marked an inline comment as done. NoQ added inline comments. Comment at: clang/utils/analyzer/exploded-graph-rewriter.py:647 else: +self._dump(' (%s)' % st.ptr) if prev_st is not None: Charusso wrote: > Extra space at the

[PATCH] D65427: [analyzer] exploded-graph-rewriter: Implement Store pointers.

2019-07-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 212257. NoQ added a comment. Hmm, on second thought... Make the pointers a bit darker in dark mode. F9692102: Screen Shot 2019-07-29 at 5.31.14 PM.png CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65427/new/

[PATCH] D64799: [Sema] Emit diagnostics for uncorrected delayed typos at the end of TU

2019-07-29 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Tried the suggested approach and ran into the issue described above. Either we make the diagnostics less useful ('did you mean foo::bar?' turns into 'unresolved identifier bar'; without mentioning the correction) or we even stop providing some corrections in

[PATCH] D65427: [analyzer] exploded-graph-rewriter: Implement Store pointers.

2019-07-29 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. This revision is now accepted and ready to land. Thanks! Is it working in dark-mode as expected? Comment at: clang/utils/analyzer/exploded-graph-rewriter.py:647 else: +self._dump(' (%s)' % st.ptr)

[PATCH] D65378: [analyzer][NFC] Refactoring BugReporter.cpp P1.: Store interesting symbols/regions in a simple set

2019-07-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. I dunno why rC162028 was doing this. That's some advanced archeology down there. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D65427: [analyzer] exploded-graph-rewriter: Implement Store pointers.

2019-07-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added a reviewer: Charusso. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a project: clang. Those are useful for understanding contents of `LazyCompoundVal`s.

[PATCH] D65425: [clang-doc] Fix expected output in tests

2019-07-29 Thread Diego Astiazarán via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL367279: [clang-doc] Fix expected output in tests (authored by DiegoAstiazaran, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[clang-tools-extra] r367279 - [clang-doc] Fix expected output in tests

2019-07-29 Thread Diego Astiazaran via cfe-commits
Author: diegoastiazaran Date: Mon Jul 29 17:07:34 2019 New Revision: 367279 URL: http://llvm.org/viewvc/llvm-project?rev=367279=rev Log: [clang-doc] Fix expected output in tests Removes conversion of html paths in output. These will always be in posix-style paths. Differential Revision:

[PATCH] D65050: [SemaTemplate] Mark a function type as dependent when its parameter list contains pack expansion

2019-07-29 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65050/new/ https://reviews.llvm.org/D65050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D65249: [NFC] use C++11 in AlignOf.h, remove AlignedCharArray

2019-07-29 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D65249#1603431 , @BillyONeal wrote: > (In fact I observe many patterns in this review like: > > enum { Foo = alignof(void*); } > aligned_storage_t<1234, Foo> x; > > and then a bunch of casting to treat it as a char buffer; if it

[PATCH] D65249: [NFC] use C++11 in AlignOf.h, remove AlignedCharArray

2019-07-29 Thread JF Bastien via Phabricator via cfe-commits
jfb updated this revision to Diff 212252. jfb added a comment. Significantly simplify the patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65249/new/ https://reviews.llvm.org/D65249 Files: llvm/include/llvm/Support/AlignOf.h

[PATCH] D65426: [Coverage] Hide coverage for regions with incorrect end locations (PR39942)

2019-07-29 Thread Vedant Kumar via Phabricator via cfe-commits
vsk created this revision. vsk added reviewers: rnk, phosek, manojgupta. ... instead of crashing. The real bug here is due to clang generating coverage for a conditional operator expanded from a macro. The location of the end of the conditional expression is not correct. The actual fix for this

[PATCH] D65425: [clang-doc] Fix expected output in tests

2019-07-29 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran created this revision. DiegoAstiazaran added a reviewer: juliehockett. DiegoAstiazaran added a project: clang-tools-extra. Removes conversion of html paths in output. These will always be in posix-style paths. https://reviews.llvm.org/D65425 Files:

r367276 - Fix Linux build

2019-07-29 Thread JF Bastien via cfe-commits
Author: jfb Date: Mon Jul 29 16:28:44 2019 New Revision: 367276 URL: http://llvm.org/viewvc/llvm-project?rev=367276=rev Log: Fix Linux build r367274 broke it Modified: cfe/trunk/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp Modified:

[PATCH] D64799: [Sema] Emit diagnostics for uncorrected delayed typos at the end of TU

2019-07-29 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Thanks for the suggestion. Sounds reasonably simple, I'll try this and report back with the result. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64799/new/ https://reviews.llvm.org/D64799

r367274 - [NFC] avoid AlignedCharArray in clang

2019-07-29 Thread JF Bastien via cfe-commits
Author: jfb Date: Mon Jul 29 16:12:48 2019 New Revision: 367274 URL: http://llvm.org/viewvc/llvm-project?rev=367274=rev Log: [NFC] avoid AlignedCharArray in clang As discussed in D65249, don't use AlignedCharArray or std::aligned_storage. Just use alignas(X) char Buf[Size];. This will allow me

[PATCH] D64799: [Sema] Emit diagnostics for uncorrected delayed typos at the end of TU

2019-07-29 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D64799#1605211 , @ilya-biryukov wrote: > @rsmith, emitting the typos on pop expression evaluation context resulted in > a bunch of failures when trying to transform the resulting errors, see a > typical stacktrace below. >

r367271 - [DependencyCollector] Make maybeAddDependency virtual (NFC)

2019-07-29 Thread Jonas Devlieghere via cfe-commits
Author: jdevlieghere Date: Mon Jul 29 16:02:11 2019 New Revision: 367271 URL: http://llvm.org/viewvc/llvm-project?rev=367271=rev Log: [DependencyCollector] Make maybeAddDependency virtual (NFC) Make DependencyCollector::maybeAddDependency, just like its other methods, which I made virtual a

r367270 - [docs] Add a note about where UBSan emits logs

2019-07-29 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Mon Jul 29 15:54:43 2019 New Revision: 367270 URL: http://llvm.org/viewvc/llvm-project?rev=367270=rev Log: [docs] Add a note about where UBSan emits logs Modified: cfe/trunk/docs/UndefinedBehaviorSanitizer.rst Modified: cfe/trunk/docs/UndefinedBehaviorSanitizer.rst

r367269 - [DebugInfo] Don't emit incorrect descriptions of thunk params (PR42627)

2019-07-29 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Mon Jul 29 15:49:55 2019 New Revision: 367269 URL: http://llvm.org/viewvc/llvm-project?rev=367269=rev Log: [DebugInfo] Don't emit incorrect descriptions of thunk params (PR42627) The `this` parameter of a thunk requires adjustment. Stop emitting an incorrect dbg.declare

[PATCH] D64029: [PGO] Add PGO support at -O0 in the experimental new pass manager

2019-07-29 Thread Rong Xu via Phabricator via cfe-commits
xur updated this revision to Diff 212237. xur marked an inline comment as done. xur added a comment. Integrated Chandler's review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64029/new/ https://reviews.llvm.org/D64029 Files: clang/lib/CodeGen/BackendUtil.cpp

[PATCH] D64029: [PGO] Add PGO support at -O0 in the experimental new pass manager

2019-07-29 Thread Rong Xu via Phabricator via cfe-commits
xur marked 3 inline comments as done. xur added a comment. I'm sorry that I missed this review for this long! In D64029#1581952 , @chandlerc wrote: > Sorry for the delay here. > > It'd be nice to land the LLVM patch first and with its own testing -- we

[PATCH] D65349: [analyzer] Be more careful with destructors of non-regions.

2019-07-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D65349#1604363 , @baloghadamsoftware wrote: > Is there any real-world use-case for casting concrete integers to class > instances? How did you find this crashing case? I think in original code this value was produced by doing

[PATCH] D65419: [clang-doc] Fix failing tests on Windows

2019-07-29 Thread Diego Astiazarán via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL367264: [clang-doc] Fix failing tests on Windows (authored by DiegoAstiazaran, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[clang-tools-extra] r367264 - [clang-doc] Fix failing tests on Windows

2019-07-29 Thread Diego Astiazaran via cfe-commits
Author: diegoastiazaran Date: Mon Jul 29 15:03:39 2019 New Revision: 367264 URL: http://llvm.org/viewvc/llvm-project?rev=367264=rev Log: [clang-doc] Fix failing tests on Windows Tests on Windows were failing due to path separator differences. Links in HTML should use posix-style paths.

[PATCH] D65192: [Sema] Disable some enabled-by-default -Wparentheses diagnostics

2019-07-29 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. For the `&&` vs `||` and `&` vs `|` warnings, it seems extremely implausible to me that they meet the "few or no false-positives" criterion for an enabled-by-default warning. Even assuming that people don't know the relative precedences of those operators, we'd expect a

[PATCH] D62977: [clang-tidy]: Google: new check 'google-upgrade-googletest-case'

2019-07-29 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF closed this revision. EricWF added a comment. Committed in r367263. Thanks for the change, sorry about the delay. I'll go watch the bots now. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62977/new/ https://reviews.llvm.org/D62977

[clang-tools-extra] r367263 - [clang-tidy]: Google: new check 'google-upgrade-googletest-case'

2019-07-29 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Mon Jul 29 14:38:56 2019 New Revision: 367263 URL: http://llvm.org/viewvc/llvm-project?rev=367263=rev Log: [clang-tidy]: Google: new check 'google-upgrade-googletest-case' Introduce a new check to upgrade user code based on API changes in Googletest. The check finds uses of

Re: [clang-tools-extra] r367137 - [clang-format] Fix style of css file paths

2019-07-29 Thread Diego Astiazarán via cfe-commits
Hello Galina, Sorry about that, I didn't notice that test wasn't passing on Windows. I just created this revision that should fix the issue. Thanks, Diego On Mon, Jul 29, 2019 at 12:12 PM Galina Kistanova wrote: > Hello Diego, > > This commit added broken

[PATCH] D65419: [clang-doc] Fix failing tests on Windows

2019-07-29 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran created this revision. DiegoAstiazaran added a reviewer: juliehockett. DiegoAstiazaran added a project: clang-tools-extra. Tests on Windows were failing due to path separator differences. Links in HTML should use posix-style paths. https://reviews.llvm.org/D65419 Files:

[PATCH] D64799: [Sema] Emit diagnostics for uncorrected delayed typos at the end of TU

2019-07-29 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. @rsmith, emitting the typos on pop expression evaluation context resulted in a bunch of failures when trying to transform the resulting errors, see a typical stacktrace below. It seems we can actually pop expression evaluation contexts between producing and

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-07-29 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: test/OpenMP/declare_mapper_codegen.cpp:44-48 +// CK0-DAG: store i8* %0, i8** [[HANDLEADDR:%[^,]+]] +// CK0-DAG: store i8* %1, i8** [[BPTRADDR:%[^,]+]] +// CK0-DAG: store i8* %2, i8** [[VPTRADDR:%[^,]+]] +// CK0-DAG: store i64 %3,

[PATCH] D63048: Update __VERSION__ to remove the hardcoded 4.2.1 version

2019-07-29 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D63048#1605050 , @xbolva00 wrote: > Should we bump __GNUC__, __GNUC_MINOR__ too? We discussed this two weeks ago: http://lists.llvm.org/pipermail/cfe-dev/2019-July/062890.html It's unlikely that we will make any policy change

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-07-29 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added inline comments. Comment at: test/OpenMP/declare_mapper_codegen.cpp:44-48 +// CK0-DAG: store i8* %0, i8** [[HANDLEADDR:%[^,]+]] +// CK0-DAG: store i8* %1, i8** [[BPTRADDR:%[^,]+]] +// CK0-DAG: store i8* %2, i8**

[PATCH] D65192: [Sema] Disable some enabled-by-default -Wparentheses diagnostics

2019-07-29 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. I'm not sure the history behind why these were added as default-on warningsthey don't really seem appropriate as default warnings to me, either. But I think someone else probably ought to approve the change. Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-07-29 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: test/OpenMP/declare_mapper_codegen.cpp:44-48 +// CK0-DAG: store i8* %0, i8** [[HANDLEADDR:%[^,]+]] +// CK0-DAG: store i8* %1, i8** [[BPTRADDR:%[^,]+]] +// CK0-DAG: store i8* %2, i8** [[VPTRADDR:%[^,]+]] +// CK0-DAG: store i64 %3,

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-07-29 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added inline comments. Comment at: test/OpenMP/declare_mapper_codegen.cpp:44-48 +// CK0-DAG: store i8* %0, i8** [[HANDLEADDR:%[^,]+]] +// CK0-DAG: store i8* %1, i8** [[BPTRADDR:%[^,]+]] +// CK0-DAG: store i8* %2, i8**

[PATCH] D63048: Update __VERSION__ to remove the hardcoded 4.2.1 version

2019-07-29 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. https://bugs.llvm.org/show_bug.cgi?id=42817 Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63048/new/ https://reviews.llvm.org/D63048 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r367256 - [driver][test] Use /dev/null in as-options.s instead

2019-07-29 Thread Jordan Rupprecht via cfe-commits
Author: rupprecht Date: Mon Jul 29 13:09:20 2019 New Revision: 367256 URL: http://llvm.org/viewvc/llvm-project?rev=367256=rev Log: [driver][test] Use /dev/null in as-options.s instead Modified: cfe/trunk/test/Driver/as-options.s Modified: cfe/trunk/test/Driver/as-options.s URL:

[PATCH] D64146: [ConstExprPreter][WIP] Initial patch for the constexpr interpreter

2019-07-29 Thread Nandor Licker via Phabricator via cfe-commits
nand marked 10 inline comments as done. nand added a comment. We can add a separate integer type which tracks all the additional information required by `__builtin_constant_p` and compile all integers to it in this context. A later patch added an APInt fallback to the interpreter if an

r367255 - Give the 'signed/unsigned wchar_t' extension a warning flag, and follow

2019-07-29 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Jul 29 13:00:46 2019 New Revision: 367255 URL: http://llvm.org/viewvc/llvm-project?rev=367255=rev Log: Give the 'signed/unsigned wchar_t' extension a warning flag, and follow GCC 9 in promoting it to an error by default. Modified:

r367254 - When determining whether a lambda-expression is implicitly constexpr,

2019-07-29 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Jul 29 12:59:45 2019 New Revision: 367254 URL: http://llvm.org/viewvc/llvm-project?rev=367254=rev Log: When determining whether a lambda-expression is implicitly constexpr, check the formal rules rather than seeing if the normal checks produce a diagnostic. This fixes

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-07-29 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: test/OpenMP/declare_mapper_codegen.cpp:44-48 +// CK0-DAG: store i8* %0, i8** [[HANDLEADDR:%[^,]+]] +// CK0-DAG: store i8* %1, i8** [[BPTRADDR:%[^,]+]] +// CK0-DAG: store i8* %2, i8** [[VPTRADDR:%[^,]+]] +// CK0-DAG: store i64 %3,

r367253 - [driver][test] Update as-options.s to not write to a readonly tree

2019-07-29 Thread Jordan Rupprecht via cfe-commits
Author: rupprecht Date: Mon Jul 29 12:57:31 2019 New Revision: 367253 URL: http://llvm.org/viewvc/llvm-project?rev=367253=rev Log: [driver][test] Update as-options.s to not write to a readonly tree The as-options.s test writes to the build tree as of r367165. Some build systems configure this

[PATCH] D63048: Update __VERSION__ to remove the hardcoded 4.2.1 version

2019-07-29 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Some ICC behaviour.. icc -dumpversion 19.0.3.199 printf("%d %d %s", __GNUC__, __GNUC_MINOR__, __VERSION__); ./a.out 7 4 Intel(R) C++ gcc 7.4 mode Should we bump __GNUC__, __GNUC_MINOR__ too? Repository: rL LLVM CHANGES SINCE LAST ACTION

[PATCH] D49754: Add -m(no-)spe, and e500 CPU definitions and support to clang

2019-07-29 Thread Justin Hibbits via Phabricator via cfe-commits
jhibbits requested review of this revision. jhibbits added a comment. Should've marked it as need review earlier. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D49754/new/ https://reviews.llvm.org/D49754 ___

[PATCH] D65403: [COFF, ARM64] Reorder handling of aarch64 MSVC builtins

2019-07-29 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM Comment at: lib/CodeGen/CGBuiltin.cpp:8182 switch (BuiltinID) { default: return nullptr; case NEON::BI__builtin_neon_vbsl_v: dmajor wrote:

Re: r367193 - Buildbot fix for r367190

2019-07-29 Thread Gabor Borsik via cfe-commits
Looks good to me. Thanks for the fix. Aaron Ballman ezt írta (időpont: 2019. júl. 29., H, 21:06): > On Mon, Jul 29, 2019 at 3:03 PM Galina Kistanova via cfe-commits > wrote: > > > > Hello Gabor , > > > > It looks like this commit broke tests on couple builders: > > > > >

[PATCH] D65403: [COFF, ARM64] Reorder handling of aarch64 MSVC builtins

2019-07-29 Thread David Major via Phabricator via cfe-commits
dmajor marked an inline comment as done. dmajor added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:8182 switch (BuiltinID) { default: return nullptr; case NEON::BI__builtin_neon_vbsl_v: efriedma wrote: > I'm a little concerned about the

[PATCH] D63174: [clang][NewPM] Add RUNS for tests that produce slightly different IR under new PM

2019-07-29 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan abandoned this revision. leonardchan added a comment. Replaced with D65110 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63174/new/ https://reviews.llvm.org/D63174

Re: [clang-tools-extra] r367137 - [clang-format] Fix style of css file paths

2019-07-29 Thread Galina Kistanova via cfe-commits
Hello Diego, This commit added broken test to one of our win builders: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/27202 . . . Failing Tests (4): Extra Tools Unit Tests :: clang-doc/./ClangDocTests.exe/HTMLGeneratorTest.emitRecordHTML . . .

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-07-29 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added a comment. Thanks Alexey! Could you look into the runtime patch D60972 then? Comment at: test/OpenMP/declare_mapper_codegen.cpp:44-48 +// CK0-DAG: store i8* %0, i8** [[HANDLEADDR:%[^,]+]]

[PATCH] D65403: [COFF, ARM64] Reorder handling of aarch64 MSVC builtins

2019-07-29 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:8182 switch (BuiltinID) { default: return nullptr; case NEON::BI__builtin_neon_vbsl_v: I'm a little concerned about the overall code structure here; even if moving the code for the

[PATCH] D64089: [Driver] Introduce -stdlib++-isystem

2019-07-29 Thread Louis Dionne via Phabricator via cfe-commits
ldionne accepted this revision. ldionne added a comment. This revision is now accepted and ready to land. Herald added a subscriber: dexonsmith. This looks fine to me, but I'd like to have someone else familiar with the Driver/Frontend design sign off too. The implementation is trivial but I'd

Re: r367193 - Buildbot fix for r367190

2019-07-29 Thread Galina Kistanova via cfe-commits
Hello Gabor , It looks like this commit broke tests on couple builders: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/18867/steps/test-check-all/logs/stdio http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast . . .

[PATCH] D64475: [clangd] Duplicate lines of semantic highlightings sent removed.

2019-07-29 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Mostly final NITs from me, but there is an important one about removing the `erase` call on `didOpen`. Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:467 +std::lock_guard Lock(HighlightingsMutex); +

r367249 - Fix taint-generic.c on Windows, handle case in OS error

2019-07-29 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon Jul 29 11:48:50 2019 New Revision: 367249 URL: http://llvm.org/viewvc/llvm-project?rev=367249=rev Log: Fix taint-generic.c on Windows, handle case in OS error Modified: cfe/trunk/test/Analysis/taint-generic.c Modified: cfe/trunk/test/Analysis/taint-generic.c URL:

[PATCH] D64256: Teach some warnings to respect gsl::Pointer and gsl::Owner attributes

2019-07-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Thanks for the review! Since I did some refactoring I will wait for an additional accept before committing. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64256/new/ https://reviews.llvm.org/D64256 ___

[PATCH] D65127: Even more warnings utilizing gsl::Owner/gsl::Pointer annotations

2019-07-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 212207. xazax.hun edited the summary of this revision. xazax.hun added a comment. - Rebase, add the results of testing on real world projects to the description. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65127/new/

[PATCH] D65127: Even more warnings utilizing gsl::Owner/gsl::Pointer annotations

2019-07-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun marked an inline comment as done. xazax.hun added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:6581 +if (!Callee->getIdentifier()) { + auto OO = Callee->getOverloadedOperator(); + return OO == OverloadedOperatorKind::OO_Subscript ||

[PATCH] D65120: More warnings regarding gsl::Pointer and gsl::Owner attributes

2019-07-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 212206. xazax.hun marked 3 inline comments as done. xazax.hun edited the summary of this revision. xazax.hun added a comment. - Add new line to end of file. - Rebase, calls no longer need special handling. CHANGES SINCE LAST ACTION

[PATCH] D65120: More warnings regarding gsl::Pointer and gsl::Owner attributes

2019-07-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:6563 +static bool shouldTrackImplicitObjectArg(const CXXMethodDecl *Callee) { + if (auto *Conv = dyn_cast_or_null(Callee)) gribozavr wrote: > This looks like an ad-hoc rule. Is there a

[PATCH] D63082: [Diagnostics] Added support for -Wint-in-bool-context

2019-07-29 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked an inline comment as done. xbolva00 added inline comments. Comment at: test/SemaCXX/warn-int-in-bool-context.cpp:96 + + if (f == apple || orange) // expected-warning {{enum constant in boolean context}} +return a; @aaron.ballman : In C (but

[PATCH] D64256: Teach some warnings to respect gsl::Pointer and gsl::Owner attributes

2019-07-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:7095 auto *MTE = dyn_cast(L); + if (IsGslPtrInitWithGslTempOwner) { +Diag(DiagLoc, diag::warn_dangling_lifetime_pointer) << DiagRange; gribozavr wrote: > It is unclear

[PATCH] D64256: Teach some warnings to respect gsl::Pointer and gsl::Owner attributes

2019-07-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 212205. xazax.hun marked an inline comment as done. xazax.hun added a comment. - Actually move the code snippet in question. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64256/new/ https://reviews.llvm.org/D64256 Files:

[PATCH] D64256: Teach some warnings to respect gsl::Pointer and gsl::Owner attributes

2019-07-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 212204. xazax.hun marked an inline comment as done. xazax.hun added a comment. - A small refactoring based on an observation from a review comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64256/new/ https://reviews.llvm.org/D64256 Files:

[PATCH] D64146: [ConstExprPreter][WIP] Initial patch for the constexpr interpreter

2019-07-29 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D64146#1604717 , @nand wrote: > > How do you intend to represent pointers cast to integer types? Allocating > > 64 bits of state for a 64-bit integer is insufficient to model that case. > > Is this ever going to be allowed in

[PATCH] D64793: [Driver] Properly use values-X[ca].o, values-xpg[46].o on Solaris

2019-07-29 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. > I fear it is necessary: at least it matches documented behaviour of both the > Sun/Oracle Studio compilers and gcc. I will defer to your opinion here. But -- one last attempt at dissuading you. :) Is this really doing something _important_, or is it just legacy

[PATCH] D65410: [PassManager] First Pass implementation at -O1 pass pipeline

2019-07-29 Thread Eric Christopher via Phabricator via cfe-commits
echristo created this revision. echristo added reviewers: chandlerc, hfinkel. Herald added subscribers: cfe-commits, jfb, dexonsmith, steven_wu, hiraditya, javed.absar, mcrosier, mehdi_amini. Herald added projects: clang, LLVM. As a follow-up to my initial mail to llvm-dev here's a first pass at

[PATCH] D65343: [clang-tidy] Fix the documentation for linuxkernel-must-use-errs.

2019-07-29 Thread Tom Roeder via Phabricator via cfe-commits
tmroeder updated this revision to Diff 212201. tmroeder added a comment. Sync to HEAD to prepare for commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65343/new/ https://reviews.llvm.org/D65343 Files: clang-tools-extra/docs/ReleaseNotes.rst

[PATCH] D64793: [Driver] Properly use values-X[ca].o, values-xpg[46].o on Solaris

2019-07-29 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D64793#1597765 , @ro wrote: > In D64793#1597550 , @jyknight wrote: > > > How about instead just adding "values-xpg6.o" unconditionally, alongside > > the current unconditional

  1   2   >