[PATCH] D65616: Ignore -fsemantic-interposition/-fno-semantic-interposition flag for gcc compatibility

2019-08-02 Thread serge via Phabricator via cfe-commits
serge-sans-paille accepted this revision. serge-sans-paille added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65616/new/ https://reviews.llvm.org/D65616 _

[PATCH] D61446: Generalize the pass registration mechanism used by Polly to any third-party tool

2019-08-02 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 213176. serge-sans-paille added a comment. Also fix symbol redefinition during static builds on Windows Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61446/new/ https://reviews.llvm.org/D61446 Files:

[PATCH] D64666: [Sema] Enable -Wimplicit-int-float-conversion for integral to floating point precision loss

2019-08-02 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. In D64666#1613057 , @ziangwan wrote: > The warning is actually correct here. This implicit integral to float > conversion loses precision. Is it the intended behavior of the code? If so, > we can simply add an explicit type cast t

[PATCH] D65545: Handle some fs::remove failures

2019-08-02 Thread Alex Brachet via Phabricator via cfe-commits
abrachet added a comment. > I haven't updated all ignored instances of fs::remove, I therefore can't mark > it LLVM_NODISCARD for now. I think I remember reading that casting a `[[nodiscard]]` functions return to void was broken on some compilers, ie still warns. You cast `fs::remove` to void

[PATCH] D65029: [Driver] Support for disabling sanitizer runtime linking

2019-08-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D65029#1613315 , @phosek wrote: > I've updated the change and renamed the flag to `-fsanitize-no-runtime` > although I'm not sure if it's necessarily better. I was thinking that ideal > interface might be `-fsanitize-runtime=(

[PATCH] D65483: [clang-doc] Add link to source code in file definitions

2019-08-02 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran added a subscriber: phosek. DiegoAstiazaran added inline comments. Comment at: clang-tools-extra/clang-doc/HTMLGenerator.cpp:377-378 + "href", (FileURL + "#" + std::to_string(L.LineNumber)).str()); + Node->Children.emplace_back(std::move(LocNumberNode)); +

[PATCH] D65690: [clang-doc] Add index in each info html file

2019-08-02 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran updated this revision to Diff 213171. DiegoAstiazaran marked 2 inline comments as done. DiegoAstiazaran added a comment. Fix format of index.js file CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65690/new/ https://reviews.llvm.org/D65690 Files: clang-tools-extra/clang

[PATCH] D65690: [clang-doc] Add index in each info html file

2019-08-02 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran added inline comments. Comment at: clang-tools-extra/clang-doc/assets/index.js:17 + return FilePath.substring(Path.length + 1) + Path = Path.substring(0, Path.lastIndexOf("/")); + } phosek wrote: > Wrong indentation? Yes, clang-format "

[PATCH] D65029: [Driver] Support for disabling sanitizer runtime linking

2019-08-02 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 213170. phosek edited the summary of this revision. phosek added a comment. Herald added a subscriber: cryptoad. I've updated the change and renamed the flag to `-fsanitize-no-runtime` although I'm not sure if it's necessarily better. I was thinking that ideal

[PATCH] D65483: [clang-doc] Add link to source code in file definitions

2019-08-02 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran updated this revision to Diff 213169. DiegoAstiazaran marked 7 inline comments as done. DiegoAstiazaran added a comment. Change http to https as the default fix to the repository link. Add new flags to clang-doc documentation. CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D65300: [clang] [CodeGen] clang-misexpect prototype for compiler warnings

2019-08-02 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth updated this revision to Diff 213167. paulkirth added a comment. Update documentation and fix typos Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65300/new/ https://reviews.llvm.org/D65300 Files: clang/include/clang/Basic/CodeGenOption

[PATCH] D65622: [clang-doc] Update documentation

2019-08-02 Thread Diego Astiazarán via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL367743: [clang-doc] Update documentation (authored by DiegoAstiazaran, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llv

[PATCH] D65300: [clang] [CodeGen] clang-misexpect prototype for compiler warnings

2019-08-02 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth updated this revision to Diff 213164. paulkirth added a comment. Address feedback from review 1. Fixed comments in License headers 2. removed excess {} 3. Changed conditional assignment to ternary operation 4. Moved local functions into anonymous namespace 5. Added reference to the orig

[clang-tools-extra] r367743 - [clang-doc] Update documentation

2019-08-02 Thread Diego Astiazaran via cfe-commits
Author: diegoastiazaran Date: Fri Aug 2 19:18:06 2019 New Revision: 367743 URL: http://llvm.org/viewvc/llvm-project?rev=367743&view=rev Log: [clang-doc] Update documentation HTML generator has been included in clang-tools-extra release notes. clang-doc documentation file has been updated. Diffe

[PATCH] D65484: [analyzer][NFC] Refactoring BugReporter.cpp P5.: Compact mile long function invocations into objects

2019-08-02 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. *bows down to those who bestow documentation upon this code* Comment at: clang/lib/StaticAnalyzer/Core/BugReporter.cpp:111 +/// getters and some well placed asserts for extra secur

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

2019-08-02 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. Do it! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65382/new/ https://reviews.llvm.org/D65382 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D65663: [analyzer] ConditionBRVisitor: Fix HTML PathDiagnosticPopUpPieces

2019-08-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Aha, aha, looks reasonable. If we're describing a variable, we should only highlight that variable. Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:2420 + if (!IsAssuming) { +PathDiagnosticLocation Loc(BExpr->getLHS(), BRC.getSourceM

[PATCH] D65690: [clang-doc] Add index in each info html file

2019-08-02 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: clang-tools-extra/clang-doc/assets/index.js:17 + return FilePath.substring(Path.length + 1) + Path = Path.substring(0, Path.lastIndexOf("/")); + } Wrong indentation? CHANGES SINCE LAST ACTION https://review

[PATCH] D62445: [test] Fix plugin tests

2019-08-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Ugh, there seems to be one more forgotten buildbot with plugins problems: http://green.lab.llvm.org/green/job/clang-stage2-cmake-RgSan/6406/consoleText FAIL: Clang :: Analysis/checker-plugins.c (467 of 14955) TEST 'Clang :: Analysis/checker-plugins.c

[PATCH] D65622: [clang-doc] Update documentation

2019-08-02 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran updated this revision to Diff 213162. DiegoAstiazaran added a comment. Specify that `stylesheets` flag is only required for html format. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65622/new/ https://reviews.llvm.org/D65622 Files: clang-tools-extra/docs/ReleaseNotes

[PATCH] D65597: WIP: Builtins: Start adding half versions of math builtins

2019-08-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In N2405 (http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2405.pdf), these are called `truncf16`, `cosf16`, etc., which I think is appropriate. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65597/new/ https://reviews.llvm.org/D65597 ___

[PATCH] D65690: [clang-doc] Add index in each info html file

2019-08-02 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran created this revision. DiegoAstiazaran added reviewers: jakehehrlich, juliehockett, phosek. DiegoAstiazaran added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman, mgrang, mgorny. An index structure is created while generating the output file for each info

[PATCH] D65688: [AIX][test/Index] Set/propagate AIXTHREAD_STK for AIX

2019-08-02 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast created this revision. hubert.reinterpretcast added reviewers: xingxue, daltenty, jasonliu. Herald added subscribers: jfb, arphaman. Herald added a project: clang. Some tests perform deep recursion, which requires a larger pthread stack size than the relatively low default

[PATCH] D65545: Handle some fs::remove failures

2019-08-02 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/lib/Frontend/ASTUnit.cpp:2315-2316 if (Out.has_error()) { Out.clear_error(); -return true; +return llvm::createStringError(Out.error(), "AST serialization failed"); } Will `Out.error()` still wor

[PATCH] D65650: [Analyzer] Iterator Checkers - Fix for Crash on Iterator Differences

2019-08-02 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. Fair enough! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65650/new/ https://reviews.llvm.org/D65650 ___ cfe-commits

[PATCH] D65622: [clang-doc] Update documentation

2019-08-02 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich accepted this revision. jakehehrlich added a comment. This revision is now accepted and ready to land. This looks fine to me CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65622/new/ https://reviews.llvm.org/D65622 ___ cfe-commi

[PATCH] D65628: [clang-doc] Parallelize reducing phase

2019-08-02 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich added a comment. LGTM other than a couple atomicity issues. Comment at: clang-tools-extra/clang-doc/tool/ClangDocMain.cpp:244 + llvm::errs() << toString(ReadInfos.takeError()) << "\n"; + Error = true; + return; use std::a

r367733 - The MinGW linker supports response files

2019-08-02 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Aug 2 15:55:00 2019 New Revision: 367733 URL: http://llvm.org/viewvc/llvm-project?rev=367733&view=rev Log: The MinGW linker supports response files This affects both LLD and ld.bfd. This isn't testable with a normal driver test with -### because those command lines are pri

[PATCH] D65483: [clang-doc] Add link to source code in file definitions

2019-08-02 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich added inline comments. Comment at: clang-tools-extra/clang-doc/HTMLGenerator.cpp:376 + LocNumberNode->Attributes.try_emplace( + "href", (FileURL + "#" + std::to_string(L.LineNumber)).str()); + Node->Children.emplace_back(std::move(LocNumberNode));

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

2019-08-02 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. lgtm If I interpret @jyknight correctly, having failed to dissuade you, he doesn't feel strongly enough about this to block it, he just wants to reduce legacy when feasible. Repository: rC Clan

[PATCH] D65030: [clang-doc] Add second index for sections within info's content

2019-08-02 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich accepted this revision. jakehehrlich added a comment. This revision is now accepted and ready to land. This looks awesome! Comment at: clang-tools-extra/clang-doc/HTMLGenerator.cpp:257 +genTypeReference(const Reference &Type, StringRef CurrentDirectory, +

[PATCH] D64666: [Sema] Enable -Wimplicit-int-float-conversion for integral to floating point precision loss

2019-08-02 Thread Ziang Wan via Phabricator via cfe-commits
ziangwan added a comment. In D64666#1612947 , @mgorny wrote: > This change seems to have broken libc++ tests when run with trunk clang: > > http://lab.llvm.org:8011/builders/netbsd-amd64/builds/21221/steps/run%20unit%20tests/logs/FAIL%3A%20libc%2B%2B%3A%

[PATCH] D65003: [clang-doc] Add index in each info html file

2019-08-02 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich added a comment. I think everything but the implementation of `genIndex` being confusing looks good to me. I haven't actually groked how that code works yet other than the fact that it generates the index tree that I expect and all the surrounding code looks good to me. I understan

[PATCH] D65627: [clang-doc] Add flag to continue after mapping errors

2019-08-02 Thread Diego Astiazarán via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL367729: [clang-doc] Add flag to continue after mapping errors (authored by DiegoAstiazaran, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[clang-tools-extra] r367729 - [clang-doc] Add flag to continue after mapping errors

2019-08-02 Thread Diego Astiazaran via cfe-commits
Author: diegoastiazaran Date: Fri Aug 2 15:02:36 2019 New Revision: 367729 URL: http://llvm.org/viewvc/llvm-project?rev=367729&view=rev Log: [clang-doc] Add flag to continue after mapping errors The tool used to stop execution if there was an error in the mapping phase. It will now show the erro

[PATCH] D65582: IR: accept and print numbered %N names for function args

2019-08-02 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. lgtm Comment at: llvm/utils/add_argument_names.py:5 +def fix_string(s): +TYPE = re.compile('\s*(i[0-9]+|float|double|x86_fp80|fp128|ppc_fp128|\[\[.*?\]\]|\[2 x \[\[[A-Z_0-9]+

[PATCH] D64666: [Sema] Enable -Wimplicit-int-float-conversion for integral to floating point precision loss

2019-08-02 Thread Ziang Wan via Phabricator via cfe-commits
ziangwan added a comment. The two failing cases I am seeing are: /home/motus/netbsd8/netbsd8/llvm/projects/libcxx/include/random:3648:40: error: implicit conversion from 'unsigned long' to 'double' changes value from 18446744073709551615 to 18446744073709551616 [-Werror,-Wimplicit-int-float-

[PATCH] D65664: [BPF] annotate DIType metadata for builtin preseve_array_access_index()

2019-08-02 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL367724: [BPF] annotate DIType metadata for builtin preseve_array_access_index() (authored by yhs, committed by ). Changed prior to commit: https://reviews.llvm.org/D65664?vs=213122&id=213129#toc Reposi

[PATCH] D64958: [clang-doc] Fix link generation

2019-08-02 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran updated this revision to Diff 213128. DiegoAstiazaran marked 3 inline comments as done. DiegoAstiazaran added a comment. Fix comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64958/new/ https://reviews.llvm.org/D64958 Files: clang-tools-extra/clang-doc/BitcodeRea

[PATCH] D65387: [clangd] Add a callback mechanism for handling responses from client.

2019-08-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Thanks, this looks a lot better. There are a bunch of details that can be simplified and names that could be clearer, but I think this is the right shape. Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:161 + +Callback FoundCB = nullptr;

[PATCH] D65562: Move LangStandard*, InputKind::Language to Basic

2019-08-02 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. Looks good either way. Comment at: include/clang/Basic/LangStandard.h:19 +/// standard and possible actions. +enum Language { + Unknown, ro wrote: > rnk wrote: >

r367724 - [BPF] annotate DIType metadata for builtin preseve_array_access_index()

2019-08-02 Thread Yonghong Song via cfe-commits
Author: yhs Date: Fri Aug 2 14:28:28 2019 New Revision: 367724 URL: http://llvm.org/viewvc/llvm-project?rev=367724&view=rev Log: [BPF] annotate DIType metadata for builtin preseve_array_access_index() Previously, debuginfo types are annotated to IR builtin preserve_struct_access_index() and pres

[PATCH] D64666: [Sema] Enable -Wimplicit-float-conversion for integral to floating point precision loss

2019-08-02 Thread Michał Górny via Phabricator via cfe-commits
mgorny added subscribers: krytarowski, EricWF, mclow.lists, howard.hinnant, mgorny. mgorny added a comment. This change seems to have broken libc++ tests when run with trunk clang: http://lab.llvm.org:8011/builders/netbsd-amd64/builds/21221/steps/run%20unit%20tests/logs/FAIL%3A%20libc%2B%2B%3A%3A

[PATCH] D65627: [clang-doc] Add flag to continue after mapping errors

2019-08-02 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran updated this revision to Diff 213126. DiegoAstiazaran retitled this revision from "[clang-doc] Continue after mapping error" to "[clang-doc] Add flag to continue after mapping errors". DiegoAstiazaran edited the summary of this revision. DiegoAstiazaran added a comment. A flag has

[PATCH] D65664: [BPF] annotate DIType metadata for builtin preseve_array_access_index()

2019-08-02 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song updated this revision to Diff 213122. yonghong-song added a comment. set metadata unless metadata is non-NULL. I have not found a case where metadata is NULL. But nevertheless, let us do this to avoid set a potential NULL metadata. Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D56326: [OpenMP 5.0] Parsing/sema support for "omp declare mapper" directive

2019-08-02 Thread Lingda Li via Phabricator via cfe-commits
lildmh added a comment. Hi David, An extra bit is needed to be added to `IdentifierNamespace`, and I could not find another field to shrink its width. As a result, it ends up larger than a word now. If you have a better solution, I'll be happy to know. Thanks, Lingda Repository: rC Clang

Buildmaster cleaning/ removing long time off-line builders

2019-08-02 Thread Galina Kistanova via cfe-commits
Hello everyone, I am going to remove builders/slaves which are off-line for a long time now: clang-x64-ninja-win7 clang-x86_64-freebsd11 clang-x86_64-linux-selfhost-modules-2 openmp-clang-ppc64le-linux-debian openmp-clang-ppc64le-linux-rhel Please feel free to bring them back any time you need i

[PATCH] D65589: [clang] Fix mismatched args constructing AddressSpaceAttr.

2019-08-02 Thread Anton Bikineev via Phabricator via cfe-commits
AntonBikineev added a comment. Pinging for review.. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65589/new/ https://reviews.llvm.org/D65589 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[PATCH] D65668: [Driver][test] Avoid undefined grep in darwin-ld.c

2019-08-02 Thread Hubert Tong via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL367709: [Driver][test] Avoid undefined grep in darwin-ld.c (authored by hubert.reinterpretcast, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM

r367709 - [Driver][test] Avoid undefined grep in darwin-ld.c

2019-08-02 Thread Hubert Tong via cfe-commits
Author: hubert.reinterpretcast Date: Fri Aug 2 12:26:05 2019 New Revision: 367709 URL: http://llvm.org/viewvc/llvm-project?rev=367709&view=rev Log: [Driver][test] Avoid undefined grep in darwin-ld.c Summary: question-mark is not a BRE special character. POSIX.1-2017 XBD Section 9.3.2 indicates

r367708 - Remove a dead diagnostic, NFC

2019-08-02 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Fri Aug 2 12:25:58 2019 New Revision: 367708 URL: http://llvm.org/viewvc/llvm-project?rev=367708&view=rev Log: Remove a dead diagnostic, NFC This was issued in Objective-C 1 mode, but we not longer support that, so this is just unreachable. Modified: cfe/trunk/include/cl

[PATCH] D64958: [clang-doc] Fix link generation

2019-08-02 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich accepted this revision. jakehehrlich added a comment. This revision is now accepted and ready to land. The code looks fine to me but I don't understand the global details of this. Hopefully Julie can still review things from there but if not we don't get timely reviews then we can s

[PATCH] D65627: [clang-doc] Continue after mapping error

2019-08-02 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich added a comment. What's the use case for this and how do we handle return codes when an error occurs but we continue on? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65627/new/ https://reviews.llvm.org/D65627 ___ cfe-commits

[PATCH] D65622: [clang-doc] Update documentation

2019-08-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-doc.rst:93 +--public - Document only public declarations. +--stylesheets= - CSS stylesheets to extend the default styles. It'll be reasonable to mention t

[PATCH] D65668: [Driver][test] Avoid undefined grep in darwin-ld.c

2019-08-02 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D65668#1612711 , @rnk wrote: > I assume this is affecting a real platform that you care about, but I'm > curious what it is. Yes, this is affecting our tests on AIX. `\?` there matches a literal `?` character.

[PATCH] D62829: [clang-tidy] Check for dynamically initialized statics in headers.

2019-08-02 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. I think this last update clarified the concerns i raised in last comment. But, did you mean to update the tests? They should have broke now that you require `!getLangOpts().ThreadsafeStatics`. Comment at: clang-tools-extra/docs/clang-tidy/checks/bu

[PATCH] D62829: [clang-tidy] Check for dynamically initialized statics in headers.

2019-08-02 Thread Charles Zhang via Phabricator via cfe-commits
czhang added inline comments. Comment at: clang-tools-extra/test/clang-tidy/bugprone-dynamic-static-initializers.hpp:33-35 + // This may work fine when optimization is enabled because bar() can + // be turned into a constant 7. But without optimization, it can + // cause pro

[PATCH] D65300: [clang] [CodeGen] clang-misexpect prototype for compiler warnings

2019-08-02 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/lib/CodeGen/MisExpect.cpp:140-146 +void EmitMisExpectWarning(const CallExpr *Call, CodeGenModule &CGM) { + SourceLocation ExprLoc = Call->getBeginLoc(); + unsigned DiagID = CGM.getDiags().getCustomDiagID( + DiagnosticsEngin

[PATCH] D62829: [clang-tidy] Check for dynamically initialized statics in headers.

2019-08-02 Thread Charles Zhang via Phabricator via cfe-commits
czhang updated this revision to Diff 213102. czhang marked an inline comment as done. czhang added a comment. Be more explicit about -fno-threadsafe-statics CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62829/new/ https://reviews.llvm.org/D62829 Files: clang-tools-extra/clang-tidy/bu

[PATCH] D65405: [Parser] Use special definition for pragma annotations

2019-08-02 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. > LGTM, although I don't think it would be ridiculous to make this an inline > function definition like isAnnotation. Thank you! The fix for `isAnnotation` is D65670 . Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews

[PATCH] D65670: Use switch instead of series of comparisons

2019-08-02 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65670/new/ https://reviews.llvm.org/D65670 ___

[PATCH] D65670: Use switch instead of series of comparisons

2019-08-02 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rjmccall, alexfh. Herald added a project: clang. This is style correction, no functional changes. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D65670 Files: clang/include/clang/Basic/TokenKinds.h clang/lib/Basic/

[PATCH] D56326: [OpenMP 5.0] Parsing/sema support for "omp declare mapper" directive

2019-08-02 Thread David Major via Phabricator via cfe-commits
dmajor added a comment. Herald added a reviewer: jdoerfert. Herald added a subscriber: erik.pilkington. While debugging something else, I noticed that with this patch, `Decl` now has 33 bits worth of bitfields, so it has gained an extra word. Is that ok? Just want to make sure it wasn't unintent

[PATCH] D65300: [clang] [CodeGen] clang-misexpect prototype for compiler warnings

2019-08-02 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth marked 2 inline comments as done. paulkirth added inline comments. Comment at: clang/lib/CodeGen/MisExpect.cpp:82 + if (ExpectedTrueBranch) { +const llvm::BranchProbability HotFunctionThreshold(1, 100); +Scaled = HotFunctionThreshold.scale(CurrProfCount); -

[PATCH] D65668: [Driver][test] Avoid undefined grep in darwin-ld.c

2019-08-02 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. Probably like most programmers, I am not familiar with section 9.3.2 of posix. I assume this is affecting a real platform that you care about, but I'm curious what it is. lgtm Repository: rC Cl

[PATCH] D65668: [Driver][test] Avoid undefined grep in darwin-ld.c

2019-08-02 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast created this revision. hubert.reinterpretcast added reviewers: rnk, daltenty, xingxue, jasonliu. Herald added a project: clang. question-mark is not a BRE special character. POSIX.1-2017 XBD Section 9.3.2 indicates that the interpretation of `\?` as used by rC366282

[PATCH] D62829: [clang-tidy] Check for dynamically initialized statics in headers.

2019-08-02 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tools-extra/test/clang-tidy/bugprone-dynamic-static-initializers.hpp:33-35 + // This may work fine when optimization is enabled because bar() can + // be turned into a constant 7. But without optimization, it can + // cause

[PATCH] D62829: [clang-tidy] Check for dynamically initialized statics in headers.

2019-08-02 Thread Charles Zhang via Phabricator via cfe-commits
czhang marked 2 inline comments as done. czhang added inline comments. Comment at: clang-tools-extra/test/clang-tidy/bugprone-dynamic-static-initializers.hpp:33-35 + // This may work fine when optimization is enabled because bar() can + // be turned into a constant 7. But wit

[PATCH] D65665: Support for attributes on @class declarations

2019-08-02 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: aaron.ballman, arphaman, rjmccall. Herald added subscribers: dexonsmith, jkorous. Herald added a project: clang. This is useful to make availability checking work with forward declarations, but there also seem to be other att

[PATCH] D65635: Sidestep false positive due to a matching git repository name

2019-08-02 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 It would be cleaner to convert this test to FileCheck, but it's probably not worth spending the time at this point. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D65615: [BPF] annotate DIType metadata for builtin preseve_array_access_index()

2019-08-02 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song abandoned this revision. yonghong-song added a comment. abandon this one. use git monorepo https://reviews.llvm.org/D65664 since we have llvm/clang inter-dependence here. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65615/new/ https://reviews.llvm

[PATCH] D65664: [BPF] annotate DIType metadata for builtin preseve_array_access_index()

2019-08-02 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song created this revision. yonghong-song added a reviewer: ast. Herald added subscribers: llvm-commits, cfe-commits, arphaman, aprantl. Herald added projects: clang, LLVM. Previously, debuginfo types are annotated to IR builtin preserve_struct_access_index() and preserve_union_access_ind

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-08-02 Thread Nathan Huckleberry via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL367694: [clang-tidy] Adding static analyzer check to list of clang-tidy checks (authored by Nathan-Huckleberry, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Chang

[clang-tools-extra] r367694 - [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-08-02 Thread Nathan Huckleberry via cfe-commits
Author: nathan-huckleberry Date: Fri Aug 2 10:18:31 2019 New Revision: 367694 URL: http://llvm.org/viewvc/llvm-project?rev=367694&view=rev Log: [clang-tidy] Adding static analyzer check to list of clang-tidy checks Summary: Since clang-tidy supports use of the static analyzer there should be doc

[PATCH] D62829: [clang-tidy] Check for dynamically initialized statics in headers.

2019-08-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/test/clang-tidy/bugprone-dynamic-static-initializers.hpp:33-35 + // This may work fine when optimization is enabled because bar() can + // be turned into a constant 7. But without optimization, it can + // ca

[PATCH] D65663: [analyzer] ConditionBRVisitor: Fix HTML PathDiagnosticPopUpPieces

2019-08-02 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso created this revision. Charusso added a reviewer: NoQ. Charusso added a project: clang. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Charusso added a comment. It also reverts https://reviews.llvm.

[PATCH] D65663: [analyzer] ConditionBRVisitor: Fix HTML PathDiagnosticPopUpPieces

2019-08-02 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. It also reverts https://reviews.llvm.org/rL362632 which is not a fix, but a problem instead. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65663/new/ https://reviews.llvm.org/D65663 ___ cfe

[PATCH] D62829: [clang-tidy] Check for dynamically initialized statics in headers.

2019-08-02 Thread Charles Zhang via Phabricator via cfe-commits
czhang marked 2 inline comments as done. czhang added inline comments. Comment at: clang-tools-extra/test/clang-tidy/bugprone-dynamic-static-initializers.hpp:33-35 + // This may work fine when optimization is enabled because bar() can + // be turned into a constant 7. But wit

[PATCH] D65517: [Preprocessor] Always discard body of #define if we failed to parse it

2019-08-02 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Thanks! Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65517/new/ https://reviews.llvm.org/D65517 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[PATCH] D65192: [Sema] Make -Wbitwise-op-parentheses and -Wlogical-op-parentheses disabled-by-default

2019-08-02 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL367690: [Sema] Disable -Wbitwise-op-parentheses and -Wlogical-op-parentheses by default (authored by MaskRay, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Reposit

[PATCH] D65192: [Sema] Make -Wbitwise-op-parentheses and -Wlogical-op-parentheses disabled-by-default

2019-08-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 213065. MaskRay added a comment. . Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65192/new/ https://reviews.llvm.org/D65192 Files: include/clang/Basic/DiagnosticSemaKinds.td test/Sema/bitwise-op-parentheses.c test/Sema

r367690 - [Sema] Disable -Wbitwise-op-parentheses and -Wlogical-op-parentheses by default

2019-08-02 Thread Fangrui Song via cfe-commits
Author: maskray Date: Fri Aug 2 09:31:38 2019 New Revision: 367690 URL: http://llvm.org/viewvc/llvm-project?rev=367690&view=rev Log: [Sema] Disable -Wbitwise-op-parentheses and -Wlogical-op-parentheses by default Summary: The -Wparentheses warnings are enabled by default in clang but they are un

[PATCH] D65192: [Sema] Make -Wbitwise-op-parentheses and -Wlogical-op-parentheses disabled-by-default

2019-08-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 213064. MaskRay added a comment. Add bitwise-op-parentheses.c logical-op-parentheses.c Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65192/new/ https://reviews.llvm.org/D65192 Files: include/clang/Basic/DiagnosticSemaKinds

[PATCH] D65300: [clang] [CodeGen] clang-misexpect prototype for compiler warnings

2019-08-02 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth updated this revision to Diff 213059. paulkirth marked 2 inline comments as done. paulkirth added a comment. Fix typo in comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65300/new/ https://reviews.llvm.org/D65300 Files: clang/inc

[PATCH] D64464: [CodeGen] Emit destructor calls for non-trivial C structs

2019-08-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Herald added a subscriber: rnkovacs. Comment at: include/clang/AST/ExprCXX.h:3220 + /// It's useful to remember the set of blocks and compound literals; we could + /// also remember the set of temporaries, but there's currently no need. + using

[PATCH] D65655: [clangd] Fix a crash when presenting values for Hover

2019-08-02 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a subscriber: hans. ilya-biryukov added a comment. @hans, could we merge this commit into the release branch? Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65655/new/ https://reviews.llvm.org/D65655 __

[PATCH] D65655: [clangd] Fix a crash when presenting values for Hover

2019-08-02 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL367687: [clangd] Fix a crash when presenting values for Hover (authored by ibiryukov, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: http

[clang-tools-extra] r367687 - [clangd] Fix a crash when presenting values for Hover

2019-08-02 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Fri Aug 2 08:23:04 2019 New Revision: 367687 URL: http://llvm.org/viewvc/llvm-project?rev=367687&view=rev Log: [clangd] Fix a crash when presenting values for Hover Summary: We should pass the expression type, not a variable type when printing the resulting value. Variabl

[PATCH] D64932: [Parser] Emit descriptive diagnostic for misplaced pragma

2019-08-02 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64932/new/ https://reviews.llvm.org/D64932 ___

[PATCH] D65573: Add User docs for ASTImporter

2019-08-02 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 23 inline comments as done. martong added a comment. Thanks for the review! Comment at: clang/docs/LibASTImporter.rst:19 +``ASTContext`` holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic analysis of a file. +The

[PATCH] D65573: Add User docs for ASTImporter

2019-08-02 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 213046. martong marked 5 inline comments as done. martong added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65573/new/ https://reviews.llvm.org/D65573 Files: clang/docs/LibAST

[PATCH] D65657: [clangd][vscode] clang-format the the extension code.

2019-08-02 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL367684: [clangd][vscode] clang-format the the extension code. (authored by hokein, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https:/

[clang-tools-extra] r367684 - [clangd][vscode] clang-format the the extension code.

2019-08-02 Thread Haojian Wu via cfe-commits
Author: hokein Date: Fri Aug 2 07:24:02 2019 New Revision: 367684 URL: http://llvm.org/viewvc/llvm-project?rev=367684&view=rev Log: [clangd][vscode] clang-format the the extension code. Summary: As we are going to grow the extension in the near future, it is time to formalize the TS code format/

[PATCH] D65510: [clangd] Fix implicit template instatiations appearing as topLevelDecls.

2019-08-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. the change looks good to me, leave the final approval to Ilya as he knows more context. Comment at: clang-tools-extra/clangd/unittests/ClangdUnitTests.cpp:116 + auto AST = TU.build(); + EXPECT_THAT(AST.getLocalTopLevelDecls(), ElementsAre(DeclNamed("f

[PATCH] D65526: [Clangd] Initial prototype version of ExtractFunction

2019-08-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp:211 + // Note that DRELocType is never OUTSIDECONTEXT. + if (DeclLocType + 1 != DRELocType) +return; SureYeaah wrote: > sammccall wrote: > > this line

[PATCH] D65657: [clangd][vscode] clang-format the the extension code.

2019-08-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added reviewers: ilya-biryukov, sammccall, jvikstrom. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. As we are going to grow the extension in the near future, it is time to formalize the TS code format/style of ou

[PATCH] D65526: [Clangd] Initial prototype version of ExtractFunction

2019-08-02 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah marked 2 inline comments as done. SureYeaah added a comment. In D65526#1612117 , @sammccall wrote: > I guess you're looking for design review at this point. > > But the most important part of that is the documentation of the high-level > structu

[PATCH] D65517: [Preprocessor] Always discard body of #define if we failed to parse it

2019-08-02 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. In D65517#1609990 , @ilya-biryukov wrote: > SG, just wanted to make sure it's on your list ;-) Merged in r367681. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65517/new/ https://reviews.llvm.org/D

Re: r367530 - [Preprocessor] Always discard body of #define if we failed to parse it

2019-08-02 Thread Hans Wennborg via cfe-commits
Merged to release_90 in r367681. On Thu, Aug 1, 2019 at 11:09 AM Ilya Biryukov via cfe-commits wrote: > > Author: ibiryukov > Date: Thu Aug 1 02:10:37 2019 > New Revision: 367530 > > URL: http://llvm.org/viewvc/llvm-project?rev=367530&view=rev > Log: > [Preprocessor] Always discard body of #defi

[PATCH] D65510: [clangd] Fix implicit template instatiations appearing as topLevelDecls.

2019-08-02 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom marked 2 inline comments as done. jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/ClangdUnit.cpp:68 + if (const auto *TD = dyn_cast(D)) +return TD->getTemplateSpecializationKind() == TSK_ImplicitInstantiation; + return false;

  1   2   >