[PATCH] D59811: [clangd] Add fallback mode for code completion when compile command or preamble is not ready.

2019-03-26 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, jdoerfert, kadircet, arphaman, jkorous, MaskRay, javed.absar. Herald added a project: clang. When calling TUScehduler::runWithPreamble (e.g. in code compleiton), allow entering a fallback

r356987 - [OpenCL] Allow variadic macros as Clang feature.

2019-03-26 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Tue Mar 26 04:22:37 2019 New Revision: 356987 URL: http://llvm.org/viewvc/llvm-project?rev=356987=rev Log: [OpenCL] Allow variadic macros as Clang feature. Modified: cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td cfe/trunk/lib/Lex/PPDirectives.cpp

[PATCH] D59814: [Testing] Move clangd::Annotations to llvm testing support

2019-03-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. Seeking feedback for this change, mostly interested if this a good place for test helpers like this? I'm planning to author more tests in `clangTooling` using this soon, so moving it somewhere clang-specific is an

[PATCH] D59725: Additions to creduce script

2019-03-26 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/utils/creduce-clang-crash.py:145 + matches = re.findall(stacktrace_re, crash_output) + result = filter(lambda x: x and x.strip() not in filters, matches)[:5] + for msg in result:

r356983 - update the release notes after the change of 'clang -dumpversion'

2019-03-26 Thread Sylvestre Ledru via cfe-commits
Author: sylvestre Date: Tue Mar 26 02:48:23 2019 New Revision: 356983 URL: http://llvm.org/viewvc/llvm-project?rev=356983=rev Log: update the release notes after the change of 'clang -dumpversion' Modified: cfe/trunk/docs/ReleaseNotes.rst Modified: cfe/trunk/docs/ReleaseNotes.rst URL:

r356981 - [RISCV] Pass -target-abi to -cc1as

2019-03-26 Thread Roger Ferrer Ibanez via cfe-commits
Author: rogfer01 Date: Tue Mar 26 01:01:18 2019 New Revision: 356981 URL: http://llvm.org/viewvc/llvm-project?rev=356981=rev Log: [RISCV] Pass -target-abi to -cc1as The RISC-V assembler needs the target ABI because it defines a flag of the ELF file, as described in [1]. Make clang (the driver)

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-03-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang/include/clang/Tooling/Refactoring/Transformer.h:89 + /// relevant name, not including qualifiers. + Name, +}; ymandel wrote: > ilya-biryukov wrote: > > Same here, what happens to the template arguments and

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2019-03-26 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added a comment. In D35068#1441601 , @lebedev.ri wrote: > In D35068#1441581 , @koldaniel wrote: > > > Bug fixing: faulty handling of built-in functions. > > > Please open a new differential, that is a

[PATCH] D59754: [Sema] Add c++2a designated initializer warnings

2019-03-26 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:2044 + : std::distance(RD->field_begin(), RD->field_end()); + if (VerifyOnly && (LastIdx >= NextIdx || HasNonDesignatedInit) && + SemaRef.getLangOpts().CPlusPlus2a)

[PATCH] D59298: [RISCV] Pass -target-abi to -cc1as

2019-03-26 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
rogfer01 added a comment. Thanks Alex. I will commit it shortly. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59298/new/ https://reviews.llvm.org/D59298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D59298: [RISCV] Pass -target-abi to -cc1as

2019-03-26 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL356981: [RISCV] Pass -target-abi to -cc1as (authored by rogfer01, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D59814: [Testing] Move clangd::Annotations to llvm testing support

2019-03-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: gribozavr. Herald added subscribers: cfe-commits, jdoerfert, kadircet, arphaman, jkorous, MaskRay, ioeric, hiraditya, mgorny. Herald added projects: clang, LLVM. Annotations allow writing nice-looking unit test code when one

[PATCH] D59815: [Driver] Enable -fsanitize-address-globals-dead-stripping by default on PS4.

2019-03-26 Thread pierre gousseau via Phabricator via cfe-commits
pgousseau created this revision. pgousseau added reviewers: probinson, filcab, gbedwell, rsmith, wristow. Herald added a project: clang. Herald added a subscriber: cfe-commits. Can be safely enabled on PS4. Repository: rC Clang https://reviews.llvm.org/D59815 Files:

[PATCH] D59347: [DebugInfo] Combine Trivial and NonTrivial flags

2019-03-26 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. As a rule I would prefer flags with positive names, as it's slightly easier to read `!isTrivial` than `!isNonTrivial`. And trivially shorter. :-) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59347/new/ https://reviews.llvm.org/D59347

[PATCH] D57858: [analyzer] Add a new frontend flag to display all checker options

2019-03-26 Thread Daniel Krupp via Phabricator via cfe-commits
dkrupp added a comment. @dcoughlin I don't necessarily agree with you. Let me explain why we think this feature is important. We should give the users the possibility to list all possibly configurable checker options and their meaning. Many of these options should be possible to be set by the

[PATCH] D59665: Call to HandleNameConflict in VisitEnumDecl mistakeningly using Name instead of SearchName

2019-03-26 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D59665#1442328 , @shafik wrote: > @martong your idea does not work b/c default construction `DeclarationName()` > treats it the same as being empty. So `if (!Name)` is still `true`. And did you try moving the `push_back` to

[PATCH] D57978: [CodeGen] Generate follow-up metadata for loops with more than one transformation.

2019-03-26 Thread Dave Green via Phabricator via cfe-commits
dmgreen accepted this revision. dmgreen added a comment. This revision is now accepted and ready to land. Yeah, OK. This looks like a good patch to me. As I said, I'm not a clang expert, but the code looks sensible enough. (Perhaps wait a couple of days in case others have objections.)

[PATCH] D54978: Move the SMT API to LLVM

2019-03-26 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho added a comment. In D54978#1442493 , @aprantl wrote: > I'm afraid this broke some bots that build with `LLVM_ENABLE_MODULES=1`. > > For example: > >

[PATCH] D59665: Call to HandleNameConflict in VisitEnumDecl mistakeningly using Name instead of SearchName

2019-03-26 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Looks good for me now, but we should make a similar change in VisitRecordDecl too. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59665/new/ https://reviews.llvm.org/D59665 ___ cfe-commits mailing list

[PATCH] D59665: Call to HandleNameConflict in VisitEnumDecl mistakeningly using Name instead of SearchName

2019-03-26 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: lib/AST/ASTImporter.cpp:2463 if (!ConflictingDecls.empty()) { - Name = Importer.HandleNameConflict(Name, DC, IDNS, + Name = Importer.HandleNameConflict(SearchName, DC, IDNS,

[PATCH] D59555: [analyzer] Add yaml parser to GenericTaintChecker

2019-03-26 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp:73-75 static const unsigned InvalidArgIndex = UINT_MAX; /// Denotes the return vale. static const unsigned ReturnValueIndex = UINT_MAX - 1; boga95 wrote: >

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-03-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 192267. ymandel marked 5 inline comments as done. ymandel added a comment. - Remove lvalue-ref overloads in builder - add StringRef overloads for TextGenerator-taking methods - constrain Name targeting for ctor initializers to explicitly written

[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers

2019-03-26 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. Other than that, LGTM, thanks! Please, again, let @NoQ have the final say. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59279/new/ https://reviews.llvm.org/D59279

[PATCH] D59692: [ASTImporter] Fix name conflict handling

2019-03-26 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 192263. martong marked 2 inline comments as done. martong added a comment. - Add braces around else - Remove falsely duplicated push_back - Use Expected in HandleNameConflict Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D59692: [ASTImporter] Fix name conflict handling

2019-03-26 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 5 inline comments as done. martong added inline comments. Comment at: lib/AST/ASTImporter.cpp:2260 ConflictingDecls.push_back(FoundDecl); } a_sidorin wrote: > Do we push the same decl twice? Uhh, thanks, that is rebase error I've

[PATCH] D59817: [clangd] Add activate command to the vscode extension.

2019-03-26 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ilya-biryukov. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric. Herald added a project: clang. This would help minizime the annoying part of not activating the extension for .cu file. Repository: rCTE Clang Tools

[PATCH] D59195: [analyzer] Remove the default value arg from getChecker*Option

2019-03-26 Thread Reka Kovacs via Phabricator via cfe-commits
rnkovacs added inline comments. Comment at: lib/StaticAnalyzer/Core/AnalyzerOptions.cpp:148-150 + assert(Ret && + "This option should be either 'true' or 'false', and should've been " + "validated by CheckerRegisrty!"); NoQ wrote: > Even though

[libunwind] r356991 - Creating release candidate rc1 from release_710 branch

2019-03-26 Thread Tom Stellard via cfe-commits
Author: tstellar Date: Tue Mar 26 06:01:15 2019 New Revision: 356991 URL: http://llvm.org/viewvc/llvm-project?rev=356991=rev Log: Creating release candidate rc1 from release_710 branch Added: libunwind/tags/RELEASE_710/ libunwind/tags/RELEASE_710/rc1/ - copied from r356990,

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-03-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked an inline comment as done. ymandel added inline comments. Comment at: clang/include/clang/Tooling/Refactoring/Transformer.h:89 + /// relevant name, not including qualifiers. + Name, +}; ilya-biryukov wrote: > ymandel wrote: > > ilya-biryukov

[PATCH] D58675: [clang] Adds `-ftime-trace` option to clang that produces Chrome `chrome://tracing` compatible JSON profiling output dumps

2019-03-26 Thread Anton Afanasyev via Phabricator via cfe-commits
anton-afanasyev marked 8 inline comments as done. anton-afanasyev added inline comments. Comment at: llvm/lib/Support/TimeProfiler.cpp:33 +switch (C) { +case '"': +case '\\': takuto.ikuta wrote: > Include escape for '/' too. >

[PATCH] D59815: [Driver] Enable -fsanitize-address-globals-dead-stripping by default on PS4.

2019-03-26 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. This is fine for PS4, I'm just curious whether anyone knows if there's a predicate that means something like "target does not use GNU tools" so we don't have to itemize Fuschia and PS4 this way. Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D58675: [clang] Adds `-ftime-trace` option to clang that produces Chrome `chrome://tracing` compatible JSON profiling output dumps

2019-03-26 Thread Anton Afanasyev via Phabricator via cfe-commits
anton-afanasyev updated this revision to Diff 192268. anton-afanasyev marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58675/new/ https://reviews.llvm.org/D58675 Files: clang/include/clang/Basic/CodeGenOptions.def clang/include/clang/Driver/Options.td

[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers

2019-03-26 Thread Reka Kovacs via Phabricator via cfe-commits
rnkovacs added a comment. In D59279#1438514 , @mgrang wrote: > Yes, the reason we limit the checks only to //unordered// containers is to > reduce the false positive rate. Although, as you rightly pointed out that > //ordered// sets of pointers are as

[PATCH] D59555: [analyzer] Add yaml parser to GenericTaintChecker

2019-03-26 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D59555#1442331 , @boga95 wrote: > Why is it better not to use `static` functions/variables? Has it any > performance impact? I don't think so, I just think that it's easier to follow what's happening with a non-static

[PATCH] D59008: [AMDGPU] Switch default dwarf version to 5

2019-03-26 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. In D59008#1442515 , @dblaikie wrote: > In D59008#1442256 , @t-tye wrote: > > > In D59008#1442014 , @dblaikie > > wrote: > > > > > In

[PATCH] D56160: [clang-tidy] modernize-use-trailing-return-type check

2019-03-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp:274 + + if (F->getLocation().isInvalid()) +return; bernhardmgruber wrote: > aaron.ballman wrote: > > bernhardmgruber wrote: > > > aaron.ballman wrote: > > >

[PATCH] D59802: [clang-tidy] Add new checker: llvm-avoid-cast-in-conditional

2019-03-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Should this check also try to find this pattern: if (dyn_cast(Bobble)) ... in order to recommend the proper replacement: if (isa(Bobble)) ... I ask because the name `llvm-avoid-cast-in-conditional` sounds like it would also cover this situation and

[PATCH] D59806: [clang-tidy] Add a check for [super self] in initializers 

2019-03-26 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 192316. stephanemoore marked an inline comment as done. stephanemoore added a comment. Enclose -self in backticks in release notes and check documentation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D59646: [PR40778][PR41157][OpenCL] Prevent implicit initialization of local address space objects

2019-03-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaDecl.cpp:11648-11651 +// In OpenCL we don't allow to initialize objects in local address space. +if (getLangOpts().OpenCL && +Var->getType().getAddressSpace() == LangAS::opencl_local) + return;

[PATCH] D59827: [slh] x86 impl of ARM instrinsic for SLH

2019-03-26 Thread Zola Bridges via Phabricator via cfe-commits
zbrid created this revision. zbrid added reviewers: chandlerc, kristof.beyls, aaron.ballman, devinj.jeanpierre. Herald added subscribers: llvm-commits, cfe-commits, jdoerfert, jfb, aheejin, hiraditya, javed.absar, dschuff. Herald added projects: clang, LLVM. This is similar to the work Kristof

[PATCH] D59670: [Sema] Fix an assert when a block captures a constexpr local

2019-03-26 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:15692 + MaybeODRUseExprSet LocalMaybeODRUseExprs; + std::swap(LocalMaybeODRUseExprs, MaybeODRUseExprs); + rjmccall wrote: > It looks like `SmallPtrSet`'s move constructor does

[PATCH] D59670: [Sema] Fix an assert when a block captures a constexpr local

2019-03-26 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 192300. erik.pilkington marked an inline comment as done. erik.pilkington added a comment. Add an assert. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59670/new/ https://reviews.llvm.org/D59670 Files: clang/include/clang/Sema/Sema.h

[PATCH] D59806: [clang-tidy] Add a check for [super self] in initializers 

2019-03-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/objc/SuperSelfCheck.cpp:57 +/// \endcode +AST_MATCHER_P(ObjCImplementationDecl, isSubclassOf, + ast_matchers::internal::Matcher, This matcher seems like it would be

[PATCH] D59806: [clang-tidy] Add a check for [super self] in initializers 

2019-03-26 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 192312. stephanemoore added a comment. Removed usage of `auto` with a nonobvious type in isSubclassOf matcher. Added backticks around `NSObject` in docs. Synchronized check description in release notes and check documentation. Repository: rG LLVM

[PATCH] D59806: [clang-tidy] Add a check for [super self] in initializers 

2019-03-26 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 192315. stephanemoore marked 5 inline comments as done. stephanemoore added a comment. Fix diagnostic format string to actually use the message's method declaration. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D59806: [clang-tidy] Add a check for [super self] in initializers 

2019-03-26 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 192317. stephanemoore added a comment. Enclose -self in backticks in check documentation (overlooked in previous attempt). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59806/new/

[PATCH] D46140: [coroutines] Add std::experimental::task type

2019-03-26 Thread Brian Gesiak via Phabricator via cfe-commits
modocache closed this revision. modocache added a comment. Committed in rL357010 . Apologies, I forgot to include the differential revision in the commit message so this diff wasn't closed automatically as a result. I'll comment on rL357010

[PATCH] D59827: [slh] x86 impl of ARM instrinsic for SLH

2019-03-26 Thread Zola Bridges via Phabricator via cfe-commits
zbrid updated this revision to Diff 192297. zbrid added a comment. Herald added a subscriber: jsji. update whitespace in wasm file to match surrounding Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59827/new/ https://reviews.llvm.org/D59827

[PATCH] D59492: [OpenCL] Allow variadic macros as Clang feature

2019-03-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia closed this revision. Anastasia added a comment. Committed in r356987. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59492/new/ https://reviews.llvm.org/D59492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D58659: [Sema] Fix assertion when `auto` parameter in lambda has an attribute.

2019-03-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! Comment at: clang/lib/Sema/SemaType.cpp:261 +/// necessary. +QualType ReplaceAutoType(QualType TypeWithAuto, QualType Replacement) { +

[PATCH] D59670: [Sema] Fix an assert when a block captures a constexpr local

2019-03-26 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Sema/SemaExpr.cpp:15692 + MaybeODRUseExprSet LocalMaybeODRUseExprs; + std::swap(LocalMaybeODRUseExprs, MaybeODRUseExprs); +

[PATCH] D59802: [clang-tidy] Add new checker: llvm-avoid-cast-in-conditional

2019-03-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/llvm-avoid-cast-in-conditional.rst:8 +statements which will assert on failure in Debug builds. The use of +cast<> implies that the operation cannot fail, and should not be used +as the

[PATCH] D59806: [clang-tidy] Add a check for [super self] in initializers 

2019-03-26 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added inline comments. Comment at: clang-tools-extra/clang-tidy/objc/SuperSelfCheck.cpp:57 +/// \endcode +AST_MATCHER_P(ObjCImplementationDecl, isSubclassOf, + ast_matchers::internal::Matcher, aaron.ballman wrote: > This matcher seems

[PATCH] D59802: [clang-tidy] Add new checker: llvm-avoid-cast-in-conditional

2019-03-26 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a comment. In D59802#1443340 , @aaron.ballman wrote: > Should this check also try to find this pattern: > > if (dyn_cast(Bobble)) > ... > > > in order to recommend the proper replacement: > > if (isa(Bobble)) > ... > > > I ask

[PATCH] D59827: [slh] x86 impl of ARM instrinsic for SLH

2019-03-26 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin added inline comments. Comment at: clang/test/Preprocessor/init.c:9678 // WEBASSEMBLY-NEXT:#define __GXX_ABI_VERSION 1002 +// WEBASSEMBLY-NEXT: #define __HAVE_SPECULATION_SAFE_VALUE 1 // WEBASSEMBLY32-NEXT:#define __ILP32__ 1 Nit: Remove the whitespace

[PATCH] D58797: [Sema] Add some compile time _FORTIFY_SOURCE diagnostics

2019-03-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D58797#1439888 , @erik.pilkington wrote: > Ah, I didn't consider that case. Presumably `st` is configured to have > different sizes based on the target? I agree that this is a false-positive, > but it seems like a

[PATCH] D58797: [Sema] Add some compile time _FORTIFY_SOURCE diagnostics

2019-03-26 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. For that particular case, I think we could suppress the false positive using DiagRuntimeBehavior. How many total false positives are we talking about, and how many can the compiler statically prove are unreachable? Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D58675: [clang] Adds `-ftime-trace` option to clang that produces Chrome `chrome://tracing` compatible JSON profiling output dumps

2019-03-26 Thread Takuto Ikuta via Phabricator via cfe-commits
takuto.ikuta added inline comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:1352 + + llvm::TimeTraceScope TimeScope("Backend", StringRef("")); + We don't need explicit StringRef constructor call here. Just passing "" is enough. Comment

[PATCH] D59426: [PR41010][OpenCL] Allow OpenCL C style vector initialization in C++

2019-03-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added a reviewer: rsmith. rjmccall added inline comments. Comment at: lib/Sema/SemaInit.cpp:1295 +? InitializedEntity::InitializeTemporary(ElemType) +: Entity; + There should at least be a comment here explaining this, but mostly

[PATCH] D58091: Customize warnings for missing built-in type

2019-03-26 Thread Brian Cain via Phabricator via cfe-commits
bcain added a comment. In D58091#1397586 , @jyknight wrote: > I think this warning (-Wbuiltin-requires-header) doesn't really make sense as > its own warning. > > We already have two related (on-by-default) warnings. ... In D58091#1414250

r357001 - [CodeGen] Delete never used LValueAlign

2019-03-26 Thread Fangrui Song via cfe-commits
Author: maskray Date: Tue Mar 26 08:39:45 2019 New Revision: 357001 URL: http://llvm.org/viewvc/llvm-project?rev=357001=rev Log: [CodeGen] Delete never used LValueAlign It was added by rC176658 but never used since then. Modified: cfe/trunk/lib/CodeGen/CGAtomic.cpp Modified:

[PATCH] D59665: Call to HandleNameConflict in VisitEnumDecl mistakeningly using Name instead of SearchName

2019-03-26 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik marked an inline comment as done. shafik added a comment. In D59665#1442826 , @martong wrote: > In D59665#1442328 , @shafik wrote: > > > @martong your idea does not work b/c default construction > >

[PATCH] D59347: [DebugInfo] Combine Trivial and NonTrivial flags

2019-03-26 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. @asmith: Where's the LLVM-side change/review that goes with this, btw? In D59347#1442970 , @probinson wrote: > As a rule I would prefer flags with positive names, as it's slightly easier > to read `!isTrivial` than

[PATCH] D58236: Make address space conversions a bit stricter.

2019-03-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I think C probably requires us to allow this under an explicit cast, but we can at least warn about it. It does not require us to allow this as an implicit conversion, and that should be an error. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58236/new/

[PATCH] D59008: [AMDGPU] Switch default dwarf version to 5

2019-03-26 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D59008#1442962 , @probinson wrote: > In D59008#1442515 , @dblaikie wrote: > > > In D59008#1442256 , @t-tye wrote: > > > > > In D59008#1442014

[PATCH] D59670: [Sema] Fix an assert when a block captures a constexpr local

2019-03-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:15692 + MaybeODRUseExprSet LocalMaybeODRUseExprs; + std::swap(LocalMaybeODRUseExprs, MaybeODRUseExprs); + It looks like `SmallPtrSet`'s move constructor does actually guarantee to leave

[PATCH] D54978: Move the SMT API to LLVM

2019-03-26 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. Thanks! The problem with these methods is that LLVM_DUMP_METHOD forces the function to be emitted even if it is not used and Clang modules without local submodule visibility will implicitly include all header files in a module, which will then cause the missing symbol

[PATCH] D59806: [clang-tidy] Add a check for [super self] in initializers 

2019-03-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/objc/SuperSelfCheck.cpp:61 + // Check if any of the superclasses of the class match. + for (const auto *SuperClass = Node.getClassInterface()->getSuperClass(); + SuperClass != nullptr;

[PATCH] D59467: [clang] Adding the Likely Attribute from C++2a to AST

2019-03-26 Thread Gauthier via Phabricator via cfe-commits
Tyker added a comment. @lebedev.ri where are tests for AST serialization are located ? i didn't find them. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59467/new/ https://reviews.llvm.org/D59467 ___ cfe-commits mailing list

[PATCH] D58236: Make address space conversions a bit stricter.

2019-03-26 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. In D58236#1443082 , @rjmccall wrote: > I think C probably requires us to allow this under an explicit cast, but we > can at least warn about it. It does not require us to allow this as an > implicit conversion, and that should

[PATCH] D59841: [Gnu Driver] Is -pie and -static-pie are both passed, let -static-pie win.

2019-03-26 Thread Siva Chandra via Phabricator via cfe-commits
sivachandra created this revision. sivachandra added a reviewer: saugustine. Herald added a project: clang. Herald added a subscriber: cfe-commits. A static-pie binary is a PIE after all, so letting -static-pie win makes the resulting binary statically linked as well as being a PIE. Repository:

[PATCH] D59802: [clang-tidy] Add new checker: llvm-avoid-cast-in-conditional

2019-03-26 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a comment. In D59802#1443527 , @aaron.ballman wrote: > Would it make sense to transform `if (dyn_cast_or_null(Obj))` into `if > (Obj && isa(Obj))` or are there bad transformations from that? Sure, that sounds reasonable. I only see

[PATCH] D59725: Additions to creduce script

2019-03-26 Thread Amy Huang via Phabricator via cfe-commits
akhuang marked 8 inline comments as done. akhuang added inline comments. Comment at: clang/utils/creduce-clang-crash.py:145 + matches = re.findall(stacktrace_re, crash_output) + result = filter(lambda x: x and x.strip() not in filters, matches)[:5] + for msg in

[PATCH] D59603: [PR40707][PR41011][OpenCL] Allow addr space spelling without double underscore in C++ mode

2019-03-26 Thread Jinsong Ji via Phabricator via cfe-commits
jsji added a comment. Looks like this may cause some unexpected failures. See https://bugs.llvm.org/show_bug.cgi?id=41247 for more details. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59603/new/ https://reviews.llvm.org/D59603

[PATCH] D59838: gn build: Add build files for clang-include-fixer and find-all-symbols

2019-03-26 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: mbonadei. Herald added a project: LLVM. (Not adding a build file for clang-include-fixer/plugin yet.) https://reviews.llvm.org/D59838 Files: llvm/utils/gn/secondary/BUILD.gn

[PATCH] D59806: [clang-tidy] Add a check for [super self] in initializers 

2019-03-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:113 + + Finds invocations of `-self` on super instances in initializers of subclasses + of `NSObject` and recommends calling a superclass initializer instead. Please use

[PATCH] D58797: [Sema] Add some compile time _FORTIFY_SOURCE diagnostics

2019-03-26 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. (Forgot to refresh before pressing 'Submit', so maybe efriedma's comment answers all of the questions in mine ;) ) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58797/new/ https://reviews.llvm.org/D58797

[PATCH] D59845: Fix IsStructuralMatch specialization for EnumDecl to prevent re-importing an EnumDecl while trying to complete it

2019-03-26 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. LLDB regression test that goes with this fix: https://reviews.llvm.org/D59847 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59845/new/ https://reviews.llvm.org/D59845 ___ cfe-commits mailing list

[PATCH] D59347: [DebugInfo] Combine Trivial and NonTrivial flags

2019-03-26 Thread Aaron Smith via Phabricator via cfe-commits
asmith added a comment. Okay if we change the flag then I believe the tests under llvm/tests/lib/DebugInfo/CodeView must be updated. If we use NonTrivial all the existing tests work as expected. LLVM change is here (you are all reviewers). https://reviews.llvm.org/D59348 Repository: rC

[PATCH] D59628: Add support for __attribute__((objc_class_stub))

2019-03-26 Thread Jordan Rose via Phabricator via cfe-commits
jordan_rose added inline comments. Comment at: lib/CodeGen/CGObjCMac.cpp:7285 -Entry = new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.ClassnfABIPtrTy, +Entry = new llvm::GlobalVariable(CGM.getModule(), ClassGV->getType(),

[PATCH] D59802: [clang-tidy] Add new checker: llvm-avoid-cast-in-conditional

2019-03-26 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a comment. In D59802#1443451 , @hintonda wrote: > In D59802#1443340 , @aaron.ballman > wrote: > > > Should this check also try to find this pattern: > > > > if (dyn_cast(Bobble)) > > ... > > >

[PATCH] D58797: [Sema] Add some compile time _FORTIFY_SOURCE diagnostics

2019-03-26 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. We have warnings like -Wdivision-by-zero that take reachability into account: https://godbolt.org/z/3PD-eF. I don't immediately know how it's all done (e.g. in batch because CFG construction is expensive? ...), but looking there for inspiration may be useful.

[PATCH] D59845: Fix IsStructuralMatch specialization for EnumDecl to prevent re-importing an EnumDecl while trying to complete it

2019-03-26 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik created this revision. shafik added reviewers: martong, teemperor, friss, a_sidorin. Herald added subscribers: jdoerfert, rnkovacs. We may try and re-import an EnumDecl while trying to complete it in `IsStructuralMatch(...)` specialization for `EnumDecl`. This change mirrors a similar

[PATCH] D59838: gn build: Add build files for clang-include-fixer and find-all-symbols

2019-03-26 Thread Mirko Bonadei via Phabricator via cfe-commits
mbonadei accepted this revision. mbonadei added a comment. This revision is now accepted and ready to land. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59838/new/ https://reviews.llvm.org/D59838 ___ cfe-commits mailing list

[PATCH] D59845: Fix IsStructuralMatch specialization for EnumDecl to prevent re-importing an EnumDecl while trying to complete it

2019-03-26 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere added inline comments. Comment at: lib/AST/ASTImporter.cpp:1951 + // something we're trying to import while completin ToEnum + Decl *ToOrigin = Importer.GetOriginalDecl(ToEnum); + ``` if (Decl *ToOrigin = Importer.GetOriginalDecl(ToEnum)) if

[PATCH] D59802: [clang-tidy] Add new checker: llvm-avoid-cast-in-conditional

2019-03-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D59802#1443515 , @hintonda wrote: > In D59802#1443451 , @hintonda wrote: > > > In D59802#1443340 , @aaron.ballman > > wrote: > > > > >

r357027 - [clang-format] Add style option AllowShortLambdasOnASingleLine

2019-03-26 Thread Ronald Wampler via cfe-commits
Author: rdwampler Date: Tue Mar 26 13:18:14 2019 New Revision: 357027 URL: http://llvm.org/viewvc/llvm-project?rev=357027=rev Log: [clang-format] Add style option AllowShortLambdasOnASingleLine Summary: This option `AllowShortLambdasOnASingleLine` similar to the other `AllowShort*` options, but

[PATCH] D57687: [clang-format] Add style option AllowShortLambdasOnASingleLine

2019-03-26 Thread Ronald Wampler via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL357027: [clang-format] Add style option AllowShortLambdasOnASingleLine (authored by rdwampler, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[PATCH] D59725: Additions to creduce script

2019-03-26 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 192350. akhuang marked 2 inline comments as done. akhuang added a comment. Herald added a subscriber: jdoerfert. added to error message regexes and command line flags CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59725/new/

[PATCH] D59841: [Gnu Driver] If -pie and -static-pie are both passed, let -static-pie win.

2019-03-26 Thread Sterling Augustine via Phabricator via cfe-commits
saugustine added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:311 if (Args.hasArg(options::OPT_shared) || Args.hasArg(options::OPT_static) || - Args.hasArg(options::OPT_r)) + Args.hasArg(options::OPT_r) || Args.hasArg(options::OPT_static_pie))

r357031 - Make -mno-outline pass -enable-machine-outliner=never to ld in LTO

2019-03-26 Thread Jessica Paquette via cfe-commits
Author: paquette Date: Tue Mar 26 14:22:42 2019 New Revision: 357031 URL: http://llvm.org/viewvc/llvm-project?rev=357031=rev Log: Make -mno-outline pass -enable-machine-outliner=never to ld in LTO Since AArch64 has default outlining behaviour, we need to make sure that -mno-outline is actually

[PATCH] D58236: Make address space conversions a bit stricter.

2019-03-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D58236#1443556 , @ebevhan wrote: > In D58236#1443082 , @rjmccall wrote: > > > I think C probably requires us to allow this under an explicit cast, but we > > can at least warn about

[PATCH] D59802: [clang-tidy] Add new checker: llvm-avoid-cast-in-conditional

2019-03-26 Thread Don Hinton via Phabricator via cfe-commits
hintonda updated this revision to Diff 192370. hintonda added a comment. - Address additional comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59802/new/ https://reviews.llvm.org/D59802 Files:

[PATCH] D58367: [analyzer] NFC: Improve upon the concept of BugReporterVisitor.

2019-03-26 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 192372. NoQ marked 6 inline comments as done. NoQ added a comment. Remove memoization for now. Address a few inline comments. I'm mostly done with this first patch, did i accidentally miss anything? In D58367#1402796 ,

[PATCH] D59806: [clang-tidy] Add a check for [super self] in initializers 

2019-03-26 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore marked 2 inline comments as done. stephanemoore added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:113 + + Finds invocations of `-self` on super instances in initializers of subclasses + of `NSObject` and recommends calling a superclass

[PATCH] D58367: [analyzer] NFC: Improve upon the concept of BugReporterVisitor.

2019-03-26 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. Cool! I have found this message-semantic idea useful in Unity where every `GameObject` could talk with each other in a very generic way

[PATCH] D46140: [coroutines] Add std::experimental::task type

2019-03-26 Thread Lewis Baker via Phabricator via cfe-commits
lewissbaker updated this revision to Diff 192384. lewissbaker added a comment. Added missing 'require coroutines' for experimental/task entry in module.modulemap Added missing #include in experimental/task header that was failing module builds Repository: rCXX libc++ CHANGES SINCE LAST

r357036 - [cmake] Reset variable before using it

2019-03-26 Thread Shoaib Meenai via cfe-commits
Author: smeenai Date: Tue Mar 26 15:16:53 2019 New Revision: 357036 URL: http://llvm.org/viewvc/llvm-project?rev=357036=rev Log: [cmake] Reset variable before using it A bunch of macros use the same variable name, and since CMake macros don't get their own scope, the value persists across macro

[PATCH] D59628: Add support for __attribute__((objc_class_stub))

2019-03-26 Thread Slava Pestov via Phabricator via cfe-commits
slavapestov marked 11 inline comments as done. slavapestov added a comment. Thanks for the comments everyone. In the next version of the patch, I fixed most of the review feedback and also addressed an issue where super message sends were not calling `objc_loadClassRef()`.

[PATCH] D59806: [clang-tidy] Add a check for [super self] in initializers 

2019-03-26 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore marked 2 inline comments as done. stephanemoore added inline comments. Comment at: clang-tools-extra/clang-tidy/objc/SuperSelfCheck.cpp:110 + "invoke a superclass initializer?") + << Message->getMethodDecl() + <<

  1   2   >