r321861 - Commit new test file forgotten in previous commit

2018-01-05 Thread Stephan Bergmann via cfe-commits
Author: sberg Date: Thu Jan 4 23:59:57 2018 New Revision: 321861 URL: http://llvm.org/viewvc/llvm-project?rev=321861&view=rev Log: Commit new test file forgotten in previous commit Added: cfe/trunk/test/CodeGenCXX/ubsan-function-noexcept.cpp Added: cfe/trunk/test/CodeGenCXX/ubsan-function-n

[PATCH] D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

2018-01-05 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg added a comment. Should this be backported to Clang 6? Not sure how widespread a problem this is in practice (it hit me with LibreOffice). Repository: rC Clang https://reviews.llvm.org/D40720 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D20124: [PCH] Serialize skipped preprocessor ranges

2018-01-05 Thread Erik Verbruggen via Phabricator via cfe-commits
erikjv added a comment. lgtm. Ilya? https://reviews.llvm.org/D20124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41668: [clangd] Add static index for the global code completion.

2018-01-05 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/ClangdServer.h:208 bool BuildDynamicSymbolIndex = false, + std::unique_ptr StaticIdx = nullptr, llvm::Optional ResourceDir = llvm::None); Please also add comment for th

[PATCH] D41730: [clangd] Use ToolExecutor to write the global-symbol-builder tool.

2018-01-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. The implementation looks good, but to see whether sam has high-level comments on this. Comment at: clangd/index/SymbolYAML.cpp:140 llvm::yaml::Output Yout(OS); for (Symbol S : Symbols) // copy: Yout<< requires mutability. Yout<< S; --

[PATCH] D41729: Add a tool executor that runs actions on all TUs in the compilation database.

2018-01-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM. Comment at: include/clang/Tooling/AllTUsExecution.h:34 + AllTUsToolExecutor(const CompilationDatabase &Compilations, + unsigned ThreadCount, +

[PATCH] D41729: Add a tool executor that runs actions on all TUs in the compilation database.

2018-01-05 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 128719. ioeric marked 2 inline comments as done. ioeric added a comment. Address review comments. Repository: rC Clang https://reviews.llvm.org/D41729 Files: include/clang/Tooling/AllTUsExecution.h lib/Tooling/AllTUsExecution.cpp lib/Tooling/CMakeLi

[PATCH] D41729: Add a tool executor that runs actions on all TUs in the compilation database.

2018-01-05 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: include/clang/Tooling/AllTUsExecution.h:34 + AllTUsToolExecutor(const CompilationDatabase &Compilations, + unsigned ThreadCount, + std::shared_ptr PCHContainerOps = hokein wrote: >

[PATCH] D41729: Add a tool executor that runs actions on all TUs in the compilation database.

2018-01-05 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC321864: Add a tool executor that runs actions on all TUs in the compilation database. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D41729?vs=128719&id=128720#to

r321864 - Add a tool executor that runs actions on all TUs in the compilation database.

2018-01-05 Thread Eric Liu via cfe-commits
Author: ioeric Date: Fri Jan 5 02:32:16 2018 New Revision: 321864 URL: http://llvm.org/viewvc/llvm-project?rev=321864&view=rev Log: Add a tool executor that runs actions on all TUs in the compilation database. Summary: Tool results are deduplicated by the result key. Reviewers: hokein Subscrib

[PATCH] D41759: [clangd] Catch more symbols in SymbolCollector.

2018-01-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ilya-biryukov. Herald added a subscriber: klimek. We currently only collect external-linkage symbols in the collector, which results in missing some typical symbols (like no-linkage type alias symbols). This patch relaxes the constraint a bi

[PATCH] D41730: [clangd] Use ToolExecutor to write the global-symbol-builder tool.

2018-01-05 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/index/SymbolYAML.cpp:140 llvm::yaml::Output Yout(OS); for (Symbol S : Symbols) // copy: Yout<< requires mutability. Yout<< S; hokein wrote: > The function could be simplified by using the SymbolToYAML be

[PATCH] D41730: [clangd] Use ToolExecutor to write the global-symbol-builder tool.

2018-01-05 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 128723. ioeric marked 2 inline comments as done. ioeric added a comment. Address review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41730 Files: clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp clangd/index/SymbolCol

[PATCH] D41760: Introduce __builtin_load_no_speculate

2018-01-05 Thread Kristof Beyls via Phabricator via cfe-commits
kristof.beyls created this revision. kristof.beyls added a reviewer: olista01. Herald added subscribers: aheejin, javed.absar, dschuff, jfb, aemerson. Recently, Google Project Zero disclosed several classes of attack against speculative execution. One of these, known as variant-1 (CVE-2017-5753),

[PATCH] D40445: [C++17] Allow an empty expression in an if init statement

2018-01-05 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 128729. Rakete added a comment. Addressed review comments. I'll write up a patch in the next coming days then :) https://reviews.llvm.org/D40445 Files: lib/Parse/ParseExprCXX.cpp test/CXX/stmt.stmt/stmt.select/p3.cpp Index: test/CXX/stmt.stmt/st

[PATCH] D41733: [Driver] Suggest correctly spelled driver options

2018-01-05 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added inline comments. Comment at: lib/Driver/Driver.cpp:191 if (A->getOption().hasFlag(options::Unsupported)) { - Diag(diag::err_drv_unsupported_opt) << A->getAsString(Args); - ContainsError |= Diags.getDiagnosticLevel(diag::err_drv_unsupported_opt, -

[PATCH] D41448: Fix counting parameters/arguments for ObjC.

2018-01-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Can we have tests please? Repository: rC Clang https://reviews.llvm.org/D41448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2018-01-05 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Herald added subscribers: a.sidorin, rnkovacs, szepet. This one is not blocked anymore since I removed the dependency. https://reviews.llvm.org/D35110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:/

[PATCH] D41733: [Driver] Suggest correctly spelled driver options

2018-01-05 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: test/Frontend/unknown-arg.c:3 +// RUN: FileCheck %s +// RUN: not %clang_cc1 %s --hel[ -### 2>&1 | \ +// RUN: FileCheck %s --check-prefix=DID-YOU-MEAN Could we also make sure that things passed with `-Xclang` are als

Re: r321816 - [OPENMP] Add debug info for generated functions.

2018-01-05 Thread Alexey Bataev via cfe-commits
Hi Jonas, I don't think it is necessary. It is better to backport my 2 next patches with bug fixes. Best regards, Alexey 04.01.2018 15:54, Jonas Hahnfeld пишет: > Hi Alexey, > > should this change be backported to 6.0? > > Regards, > Jonas > > Am 2018-01-04 20:45, schrieb Alexey Bataev via cfe-co

Re: r321816 - [OPENMP] Add debug info for generated functions.

2018-01-05 Thread Alexey Bataev via cfe-commits
Yes, I mean these 2. - Best regards, Alexey Bataev 04.01.2018 16:02, Jonas Hahnfeld пишет: > You mean r321818 and r321820? I skipped them because they are for > NVPTX and target directives which aren't fully functional in 6.0 > anyway, right? > Or patches in the future? > > Am 2018-01

r321854 - NFC.

2018-01-05 Thread Evgeny Stupachenko via cfe-commits
Author: evstupac Date: Thu Jan 4 18:22:52 2018 New Revision: 321854 URL: http://llvm.org/viewvc/llvm-project?rev=321854&view=rev Log: NFC. The patch fixes r321395, that cuased -Werror=unused-but-set-variable issue for Diagnosed var on prod build. From: Evgeny Stupachenko Modified: cfe/tr

[PATCH] D41764: [libcxx] [cmake] Add a config option LIBCXX_HAS_WIN32_THREADS for enforcing win32 threads

2018-01-05 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: compnerd, EricWF. Herald added a subscriber: mgorny. This allows keeping libcxx using win32 threads even if a version of pthread.h is installed. This matches the existing cmake option LIBCXX_HAS_PTHREAD_API. Repository: rCXX libc++ ht

[PATCH] D41733: [Driver] Suggest correctly spelled driver options

2018-01-05 Thread Brian Gesiak via Phabricator via cfe-commits
modocache updated this revision to Diff 128736. modocache added a comment. Test -Xclang as well. Thanks, @v.g.vassilev! Repository: rC Clang https://reviews.llvm.org/D41733 Files: include/clang/Basic/DiagnosticDriverKinds.td lib/Driver/Driver.cpp lib/Frontend/CompilerInvocation.cpp t

[clang-tools-extra] r321867 - [clangd] Fix memory leak in code completion

2018-01-05 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Fri Jan 5 05:36:55 2018 New Revision: 321867 URL: http://llvm.org/viewvc/llvm-project?rev=321867&view=rev Log: [clangd] Fix memory leak in code completion Modified: clang-tools-extra/trunk/clangd/CodeComplete.cpp Modified: clang-tools-extra/trunk/clangd/CodeComplete.

[PATCH] D35109: [Analyzer] SValBuilder Comparison Rearrangement

2018-01-05 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D35109#956075, @NoQ wrote: > I'm totally fine with assuming the MAX/4 constraint on checker side - > extension math would still be better than the MAX/4 pattern-matching in core > because extension math should be more useful on its

[PATCH] D41764: [libcxx] [cmake] Add a config option LIBCXX_HAS_WIN32_THREADS for enforcing win32 threads

2018-01-05 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. I think `LIBCXX_HAS_WIN32_THREAD_API` would be more consistent with the existing configuration define names? Comment at: CMakeLists.txt:277 endif() + if(LIBCXX_HAS_WIN32_THREADS) +message(FATAL_ERROR "LIBCXX_HAS_WIN32_THREADS can only be set to

[PATCH] D41668: [clangd] Add static index for the global code completion.

2018-01-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 128741. hokein marked 5 inline comments as done. hokein added a comment. Address comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41668 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp clangd

[PATCH] D41668: [clangd] Add static index for the global code completion.

2018-01-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/ClangdServer.h:342 std::unique_ptr FileIdx; + /// If set, this provides static index for project-wide global symbols. + std::unique_ptr StaticIdx; ioeric wrote: > ... in addition to the `FileIdx` above? Update

[PATCH] D41487: [clang-format] Adds a FormatStyleSet

2018-01-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 128743. krasimir added a comment. - Address review comments Repository: rC Clang https://reviews.llvm.org/D41487 Files: include/clang/Format/Format.h lib/Format/Format.cpp Index: lib/Format/Format.cpp ===

[PATCH] D41668: [clangd] Add static index for the global code completion.

2018-01-05 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lgtm Comment at: clangd/CodeComplete.cpp:554 + const SpecifiedScope &SSInfo, + llvm::StringRef IndexSource

[PATCH] D41720: [clang-tidy] Add a -show-color flag.

2018-01-05 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. Clang supports -fcolor-diagnostics. I guess, we could use it, e.g. via -extra-arg=-fcolor-diagnostics. Comment at: clang-tidy/ClangTidyOptions.h:93 + /// \brief S

[PATCH] D41716: clang-tidy: add IgnoreMacros option to readability-inconsistent-declaration-parameter-name

2018-01-05 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D41716#967247, @vmiklos wrote: > In https://reviews.llvm.org/D41716#967237, @lebedev.ri wrote: > > > That changes the defaults though. I thought clang-tidy *tried* to produce > > the same results > > on different clang-tidy versions with the s

[PATCH] D41716: clang-tidy: add IgnoreMacros option to readability-inconsistent-declaration-parameter-name

2018-01-05 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Thus, looks good. Thanks! https://reviews.llvm.org/D41716 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/m

[PATCH] D15032: [clang-tidy] new checker cppcoreguidelines-pro-lifetime

2018-01-05 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. Herald added subscribers: kbarton, mgorny, nemanjai. https://reviews.llvm.org/D15031 has landed quite a while ago. Could you rebase the patch? https://reviews.llvm.org/D15032 ___

[PATCH] D35787: [clang-tidy] Ignore vector in inefficient-vector-operation.

2018-01-05 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D35787#830351, @hokein wrote: > In https://reviews.llvm.org/D35787#819007, @alexfh wrote: > > > Should we look at whether the size is statically known? > > > Do you mean the size of the template type T in `vector`? STL only > provides a templa

[PATCH] D40712: [Driver] Add flag enabling the function stack size section that was added in r319430

2018-01-05 Thread Sean Eveson via Phabricator via cfe-commits
seaneveson updated this revision to Diff 128745. seaneveson added a comment. Thanks Bruno, Changed the default for cc1 to be false regardless of the target. The default in the driver is still true for PS4 (only). https://reviews.llvm.org/D40712 Files: include/clang/Driver/Options.td inclu

[PATCH] D41523: xmmintrin.h documentation fixes and updates

2018-01-05 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. Sort of related - should we enable -Wdocumentation (it's currently -Wall and -Weverything might be too much) on the respective clang builtin tests? Doesn't have to be part of this patch. Comment at: lib/Headers/xmmintrin.h:1927 /// -/// This intr

[PATCH] D41720: [clang-tidy] Add a -show-color flag.

2018-01-05 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D41720#968338, @alexfh wrote: > Clang supports -fcolor-diagnostics. I guess, we could use it, e.g. via > -extra-arg=-fcolor-diagnostics. On a second thought, configuring the colors using -extra-arg doesn't seem like a good solution to me. A

[PATCH] D41487: [clang-format] Adds a FormatStyleSet

2018-01-05 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: lib/Format/Format.cpp:906-907 + } + if (!LanguageFound) +return make_error_code(ParseError::Unsuitable); + *Style = *StyleSet.Get(Language); Optional: I'd probably slightly re-structure the above to: if (!Languag

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2018-01-05 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D35110#968284, @baloghadamsoftware wrote: > This one is not blocked anymore since I removed the dependency. But I have to modify the test cases... https://reviews.llvm.org/D35110 ___

[PATCH] D41764: [libcxx] [cmake] Add a config option LIBCXX_HAS_WIN32_THREADS for enforcing win32 threads

2018-01-05 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D41764#968318, @smeenai wrote: > I think `LIBCXX_HAS_WIN32_THREAD_API` would be more consistent with the > existing configuration define names? That sounds good to me too. I can update the patch later, or before committing if it's otherwis

[PATCH] D31417: [OpenMP] Add support for omp simd pragmas without runtime

2018-01-05 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. I think we can abandon this one as support for -fopenmp-simd was committed already? https://reviews.llvm.org/D31417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 128767. ahatanak added a comment. Address review comments. I also made changes so that FunctionDecl::IsTrivialForCall is always set to true for special functions of "trivial_abi" classes. There is still one microsoft IRGen test failing because I haven't im

[PATCH] D41740: [clang-tidy] Adding a new bugprone check for streaming objects of type int8_t or uint8_t

2018-01-05 Thread Barry Revzin via Phabricator via cfe-commits
BRevzin updated this revision to Diff 128768. BRevzin added a comment. Updates based on review comments - and rebased off of latest so as to get the ReleaseNotes right. Added options so that the user can provide the list of stream types and int typedef types, as desired, defaulting to just `b

[PATCH] D41740: [clang-tidy] Adding a new bugprone check for streaming objects of type int8_t or uint8_t

2018-01-05 Thread Barry Revzin via Phabricator via cfe-commits
BRevzin marked an inline comment as done. BRevzin added a comment. In https://reviews.llvm.org/D41740#968134, @JonasToth wrote: > Could you please add a test case with a template that reduces the type to > int8 or uint8? I don't actually know how to do that. I tried a few things, but getting t

[PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak marked 10 inline comments as done. ahatanak added inline comments. Comment at: include/clang/AST/DeclCXX.h:443 +/// SMF_MoveConstructor, and SMF_Destructor are meaningful here. +unsigned HasTrivialSpecialMembersForCall : 6; + rjmccall wrote: > I

[PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak marked an inline comment as done. ahatanak added inline comments. Comment at: include/clang/Basic/AttrDocs.td:2261 +- The class or its subobjects have Objective-C pointer type members and ARC is + enabled. + }]; rjmccall wrote: > I think the right list

[PATCH] D41423: [Lex] Avoid out-of-bounds dereference in LexAngledStringLiteral.

2018-01-05 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Ping. OSS-Fuzz classifies the bug as medium severity security issue, would be great to include the fix in Clang 6.0. https://reviews.llvm.org/D41423 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.

[PATCH] D41779: [clang-tidy] Fix DanglingHandleCheck for the correct conversion operation between basic_string and basic_string_view.

2018-01-05 Thread Samuel Benzaquen via Phabricator via cfe-commits
sbenza created this revision. sbenza added a reviewer: hokein. Herald added subscribers: cfe-commits, xazax.hun, klimek. Fix DanglingHandleCheck to handle the final implementation of std::string and std::string_view. These use a conversion operator instead of a conversion constructor. Repositor

[PATCH] D39074: [libunwind][MIPS]: Add support for unwinding in N32 processes.

2018-01-05 Thread John Baldwin via Phabricator via cfe-commits
bsdjhb added a comment. Ok, I'm definitely fine with splitting the rename out into a separate patch. Will wait for @sdardis to be sure. https://reviews.llvm.org/D39074 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D41780: Preserve unknown STDC pragma through preprocessor

2018-01-05 Thread Steven Wu via Phabricator via cfe-commits
steven_wu created this revision. steven_wu added reviewers: efriedma, rsmith, arphaman. should keep the unknown STDC pragma through preprocessor and we also should not emit warning for unknown STDC pragma during preprocessor. rdar://problem/35724351 Repository: rC Clang https://reviews.llvm.

[PATCH] D36357: Added a better diagnostic when using the delete operator with lambdas

2018-01-05 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Parse/ParseExprCXX.cpp:2906-2912 +// Basic lookahead to check if we have a lambda expression. If we +// encounter two braces with a semicolon, we can be pretty sure +// that this is a lambda, not say a compound literal. +

[PATCH] D41781: [DeclPrinter] Handle built-in C++ types in -ast-print.

2018-01-05 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. tra added a reviewer: arphaman. Herald added subscribers: jlebar, sanjoy. Fixes a crash in clang when it crashed with -ast-print on code that contained decltype(nullptr). https://reviews.llvm.org/D41781 Files: clang/lib/AST/DeclPrinter.cpp clang/test/Sema/ast-pri

[PATCH] D41326: [clang-tidy] Added diagnostics about incorrect usage of NOLINT comment

2018-01-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/ClangTidyDiagnosticConsumer.cpp:839-840 +case NolintCommentType::Nolint: + Message = "there is no diagnostics on this line, " +"the NOLINT comment is redundant"; + break; ---

[PATCH] D41780: Preserve unknown STDC pragma through preprocessor

2018-01-05 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. If you move all the #pragma STDC handlers from the lexer to the parser, you might be able to avoid adding an explicit STDC handler in PrintPreprocessedOutput.cpp. Comment at: test/Preprocessor/pragma_unknown.c:32 #pragma STDC SO_GREAT // expected-w

[PATCH] D41780: Preserve unknown STDC pragma through preprocessor

2018-01-05 Thread Steven Wu via Phabricator via cfe-commits
steven_wu added a comment. In https://reviews.llvm.org/D41780#968664, @efriedma wrote: > If you move all the #pragma STDC handlers from the lexer to the parser, you > might be able to avoid adding an explicit STDC handler in > PrintPreprocessedOutput.cpp. If it is safe to do that, I can chang

[PATCH] D41780: Preserve unknown STDC pragma through preprocessor

2018-01-05 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Should be safe, I think; currently, FENV_ACCESS and CX_LIMITED_RANGE have no effect, and when we do start supporting them, we'll probably want to handle them in the parser, like we do for FP_CONTRACT. Repository: rC Clang https://reviews.llvm.org/D41780

[PATCH] D41764: [libcxx] [cmake] Add a config option LIBCXX_HAS_WIN32_THREADS for enforcing win32 threads

2018-01-05 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai accepted this revision. smeenai added a comment. This revision is now accepted and ready to land. Can you add documentation for `_LIBCPP_HAS_THREAD_API_WIN32` to `docs/DesignDocs/ThreadingSupportAPI.rst`? It should have been documented before, but this seems like a good opportunity to co

[PATCH] D36357: Added a better diagnostic when using the delete operator with lambdas

2018-01-05 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added inline comments. Comment at: lib/Parse/ParseExprCXX.cpp:2906-2912 +// Basic lookahead to check if we have a lambda expression. If we +// encounter two braces with a semicolon, we can be pretty sure +// that this is a lambda, not say a compound literal

[PATCH] D40819: Implement Attribute Target MultiVersioning (Improved edition!)

2018-01-05 Thread Erich Keane via Phabricator via cfe-commits
erichkeane marked 34 inline comments as done. erichkeane added a comment. Patch incoming, sorry it took so long! Comment at: lib/CodeGen/CGBuiltin.cpp:7673 -Value *CodeGenFunction::EmitX86CpuInit() { +Value *CodeGenFunction::EmitX86CpuInit(CGBuilderTy &Builder) { llvm::Fun

[PATCH] D40819: Implement Attribute Target MultiVersioning (Improved edition!)

2018-01-05 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 128782. erichkeane marked 7 inline comments as done. erichkeane added a comment. Fixes for all @echristo and @rsmith s comments. https://reviews.llvm.org/D40819 Files: include/clang/AST/ASTContext.h include/clang/AST/Decl.h include/clang/Basic/Attr

[PATCH] D41750: Fix TLS support check for Darwin 32-bit simulator targets.

2018-01-05 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Thanks for prompt review. https://reviews.llvm.org/D41750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r321890 - Fix TLS support check for Darwin 32-bit simulator targets.

2018-01-05 Thread Volodymyr Sapsai via cfe-commits
Author: vsapsai Date: Fri Jan 5 12:20:03 2018 New Revision: 321890 URL: http://llvm.org/viewvc/llvm-project?rev=321890&view=rev Log: Fix TLS support check for Darwin 32-bit simulator targets. Also instead of checking architecture explicitly, use recently added "simulator" environment in the trip

[PATCH] D41750: Fix TLS support check for Darwin 32-bit simulator targets.

2018-01-05 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL321890: Fix TLS support check for Darwin 32-bit simulator targets. (authored by vsapsai, committed by ). Changed prior to commit: https://reviews.llvm.org/D41750?vs=128696&id=128783#toc Repository: r

[PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 128781. https://reviews.llvm.org/D41039 Files: include/clang/AST/Decl.h include/clang/AST/DeclCXX.h include/clang/AST/Type.h include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Basic/DiagnosticSemaKinds.td include/clang/Se

[PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Sorry, the patch I've just uploaded was missing some changes I made. https://reviews.llvm.org/D41039 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 128784. ahatanak added a comment. - Serialize/deserialize the bits I added to FunctionDecl and CXXRecordDecl. - Enable passing non-trivial structs when clang abi-compat version is 4.0 or lower. - Fix a bug in Sema::CheckCompletedCXXClass where the CXXRecordD

[libcxx] r321896 - [cmake] Add a config option LIBCXX_HAS_WIN32_THREAD_API for enforcing win32 threads

2018-01-05 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Fri Jan 5 12:48:29 2018 New Revision: 321896 URL: http://llvm.org/viewvc/llvm-project?rev=321896&view=rev Log: [cmake] Add a config option LIBCXX_HAS_WIN32_THREAD_API for enforcing win32 threads This allows keeping libcxx using win32 threads even if a version of pthread.h

[PATCH] D41764: [libcxx] [cmake] Add a config option LIBCXX_HAS_WIN32_THREADS for enforcing win32 threads

2018-01-05 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL321896: [cmake] Add a config option LIBCXX_HAS_WIN32_THREAD_API for enforcing win32… (authored by mstorsjo, committed by ). Changed prior to commit: https://reviews.llvm.org/D41764?vs=128734&id=128786#

[PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-05 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/DeclCXX.h:1489-1491 + bool shouldBeDestructedInCallee() const { +return data().CanPassInRegisters && hasNonTrivialDestructor(); + } This will return incorrect results on MSVC, where every class typ

[PATCH] D41781: [DeclPrinter] Handle built-in C++ types in -ast-print.

2018-01-05 Thread Artem Belevich via Phabricator via cfe-commits
tra abandoned this revision. tra added a comment. Never mind. There must be something else going on in the case where I've discovered the crash. the test case in this patch does not really reproduce the issue by itself. :-( https://reviews.llvm.org/D41781 ___

r321899 - Add AST dumping support for _Generic expressions.

2018-01-05 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Jan 5 13:31:07 2018 New Revision: 321899 URL: http://llvm.org/viewvc/llvm-project?rev=321899&view=rev Log: Add AST dumping support for _Generic expressions. Modified: cfe/trunk/lib/AST/ASTDumper.cpp Modified: cfe/trunk/lib/AST/ASTDumper.cpp URL: http://llvm.org/vie

[PATCH] D41523: xmmintrin.h documentation fixes and updates

2018-01-05 Thread Katya Romanova via Phabricator via cfe-commits
kromanova added a comment. In https://reviews.llvm.org/D41523#968359, @RKSimon wrote: > Sort of related - should we enable -Wdocumentation (it's currently -Wall and > -Weverything might be too much) on the respective clang builtin tests? > Doesn't have to be part of this patch. Good idea,

[PATCH] D41523: xmmintrin.h documentation fixes and updates

2018-01-05 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. The builtins are tested in tests like test/CodeGen/sse-builtins.c https://reviews.llvm.org/D41523 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40819: Implement Attribute Target MultiVersioning (Improved edition!)

2018-01-05 Thread Erich Keane via Phabricator via cfe-commits
erichkeane planned changes to this revision. erichkeane added a comment. Forgot friend functions, Working on it now, sorry about that. https://reviews.llvm.org/D40819 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-

[PATCH] D41733: [Driver] Suggest correctly spelled driver options

2018-01-05 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. Thanks! LGTM. Repository: rC Clang https://reviews.llvm.org/D41733 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org

[PATCH] D40819: Implement Attribute Target MultiVersioning (Improved edition!)

2018-01-05 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 128792. erichkeane added a comment. This revision is now accepted and ready to land. Added test for friend functions. https://reviews.llvm.org/D40819 Files: include/clang/AST/ASTContext.h include/clang/AST/Decl.h include/clang/Basic/Attr.td inclu

[PATCH] D40712: [Driver] Add flag enabling the function stack size section that was added in r319430

2018-01-05 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. Thanks! LGTM https://reviews.llvm.org/D40712 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo

[PATCH] D40819: Implement Attribute Target MultiVersioning (Improved edition!)

2018-01-05 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 128793. erichkeane added a comment. Sorry for the thrash, thought of a better way to do the test just as I clicked 'save' last time :) https://reviews.llvm.org/D40819 Files: include/clang/AST/ASTContext.h include/clang/AST/Decl.h include/clang/Bas

[PATCH] D41780: Preserve unknown STDC pragma through preprocessor

2018-01-05 Thread Steven Wu via Phabricator via cfe-commits
steven_wu updated this revision to Diff 128794. steven_wu added a comment. Move STDC pragma handler to parser. Repository: rC Clang https://reviews.llvm.org/D41780 Files: include/clang/Basic/DiagnosticLexKinds.td include/clang/Basic/DiagnosticParseKinds.td include/clang/Parse/Parser.h

[PATCH] D40983: Generate Libclang invocation reproducers using a new -cc1gen-reproducer option

2018-01-05 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. Makes sense, LGTM. Should we add documentation explaining how to use this? I'm fine if it comes in a follow up commit. https://reviews.llvm.org/D40983 __

[PATCH] D41785: Print the qualified name when dumping deserialized decls.

2018-01-05 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev created this revision. v.g.vassilev added a reviewer: rsmith. This is very useful to understand and debug the lazy template specializations used in pch and modules. Repository: rC Clang https://reviews.llvm.org/D41785 Files: lib/Frontend/FrontendAction.cpp Index: lib/Fronte

r321906 - Track shadow modules with a generation counter.

2018-01-05 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Fri Jan 5 14:13:56 2018 New Revision: 321906 URL: http://llvm.org/viewvc/llvm-project?rev=321906&view=rev Log: Track shadow modules with a generation counter. This is a follow up to r321855, closing the gap between our internal shadow modules implementation and upstream. It h

[PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 128798. ahatanak marked an inline comment as done. https://reviews.llvm.org/D41039 Files: include/clang/AST/Decl.h include/clang/AST/DeclCXX.h include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak marked 3 inline comments as done. ahatanak added inline comments. Comment at: include/clang/AST/DeclCXX.h:1489-1491 + bool shouldBeDestructedInCallee() const { +return data().CanPassInRegisters && hasNonTrivialDestructor(); + } rsmith wrote: > This

[PATCH] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one.

2018-01-05 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev updated this revision to Diff 128797. v.g.vassilev added a comment. Reduce hash collisions for template specializations. Currently when we hash a tag type the visitor calls `ODRHash::AddDecl` which mostly relies on the decl name give distinct hash value. The types coming from templ

[PATCH] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one.

2018-01-05 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev updated this revision to Diff 128802. v.g.vassilev added a comment. Reduce further the deserializations from 451 to 449 by providing a more complete implementation of `ODRHash::AddTemplateArgument`. Kudos @rtrieu! https://reviews.llvm.org/D41416 Files: include/clang/AST/DeclTem

Re: [PATCH] D41316: [libcxx] Allow random_device to be built optionally

2018-01-05 Thread Zhao, Weiming via cfe-commits
We can wrap the random_device as a minstd_rand, a linear congruential enginer that a lot of C lib uses for rand(). However based on documentation, we should just provides dummy implementation which throws an exception in the constructor of random_device [1,2] But again, compared with run-time ex

[PATCH] D41780: Preserve unknown STDC pragma through preprocessor

2018-01-05 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 Repository: rC Clang https://reviews.llvm.org/D41780 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D41780: Preserve unknown STDC pragma through preprocessor

2018-01-05 Thread Steven Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. steven_wu marked an inline comment as done. Closed by commit rL321909: Preserve unknown STDC pragma through preprocessor (authored by steven_wu, committed by ). Repository: rL LLVM https://reviews.llvm.org/D41780 Files:

r321909 - Preserve unknown STDC pragma through preprocessor

2018-01-05 Thread Steven Wu via cfe-commits
Author: steven_wu Date: Fri Jan 5 14:45:03 2018 New Revision: 321909 URL: http://llvm.org/viewvc/llvm-project?rev=321909&view=rev Log: Preserve unknown STDC pragma through preprocessor Summary: #pragma STDC FP_CONTRACT handler is only registered in parser so we should keep the unknown STDC pragm

[PATCH] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one.

2018-01-05 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. Finer grained clang stats can be seen here . https://reviews.llvm.org/D41416 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

[PATCH] D41546: [clang-tidy] Adding Fuchsia checker for statically constructed objects

2018-01-05 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 128806. juliehockett marked 3 inline comments as done. juliehockett added a comment. 1. Narrowing check to only warn if the declaration is a global non-trivial object with explicit static storage, unless the object either has a `constexpr` constructor o

[PATCH] D41316: [libcxx] Allow random_device to be built optionally

2018-01-05 Thread Weiming Zhao via Phabricator via cfe-commits
weimingz added a comment. We can wrap the random_device as a minstd_rand, a linear congruential enginer that a lot of C lib uses for rand(). However based on documentation, we should just provides dummy implementation which throws an exception in the constructor of random_device [1,2] But compar

[PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak marked 2 inline comments as done. ahatanak added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:1827 + + if (!IsScalar && !CurFuncIsThunk && + (getTarget().getCXXABI().areArgsDestroyedLeftToRightInCallee() || This is not correct since it isn't

[PATCH] D41788: [DeclPrinter] Fix two cases that crash clang -ast-print.

2018-01-05 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. tra added a reviewer: arphaman. Herald added subscribers: jlebar, sanjoy. Both crashes are related to handling anonymous structures. - clang didn't handle () around an anonymous struct variable. - clang also crashed on syntax errors that could lead to other syntactic c

[PATCH] D41789: [clang-tidy] Function-scoped static variables should not trigger google-objc-global-variable-declaration

2018-01-05 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: Wizard, hokein, klimek. Herald added subscribers: cfe-commits, xazax.hun. google-objc-global-variable-declaration currently triggers on valid code like: - (void)foo { static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ /*

[PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-05 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CGCall.cpp:3498 bool HasAggregateEvalKind = hasAggregateEvaluationKind(type); + bool TypeDestructedInCallee = false; + if (const auto *RD = type->getAsCXXRecordDecl()) This is a confusing name for this fl

[PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 128815. ahatanak marked an inline comment as done. ahatanak added a comment. Check whether the argument is passed indirectly before pushing the cleanup. https://reviews.llvm.org/D41039 Files: include/clang/AST/Decl.h include/clang/AST/DeclCXX.h inclu

  1   2   >