[PATCH] D66361: Improve behavior in the case of stack exhaustion.

2019-08-16 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith updated this revision to Diff 215678. rsmith marked 2 inline comments as done. rsmith added a comment. - Review feedback: use _AddressOfReturnAddress with MSVC, and simplify Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66361/new/ https://reviews.llvm.org/

[PATCH] D66361: Improve behavior in the case of stack exhaustion.

2019-08-16 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith updated this revision to Diff 215680. rsmith added a comment. - Disable stack exhaustion test if threads are disabled. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66361/new/ https://reviews.llvm.org/D66361 Files: include/clang/Basic/DiagnosticSemaKind

[PATCH] D66332: [clang-format] Fix the bug that joins template closer and > or >>

2019-08-16 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. In D66332#1633448 , @Quuxplusone wrote: > Drive-by observation: My experiments with > https://zed0.co.uk/clang-format-configurator/ show that there is a similar > bug where clang-format accidentally produces `>=` via reformatting

[PATCH] D66361: Improve behavior in the case of stack exhaustion.

2019-08-16 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Basic/Stack.cpp:53-54 + // If the stack pointer has a surprising value, we do not understand this + // stack usage scheme. (Perhaps the target allocates new stack regions on + // demand for us.) Don't try to guess what's going on.

r369157 - [clang-format] Fix the bug that joins template closer and > or >>

2019-08-16 Thread Owen Pan via cfe-commits
Author: owenpan Date: Fri Aug 16 14:49:17 2019 New Revision: 369157 URL: http://llvm.org/viewvc/llvm-project?rev=369157&view=rev Log: [clang-format] Fix the bug that joins template closer and > or >> Also fixes a buggy test case. See PR42404 Differential Revision: https://reviews.llvm.org/D6633

[PATCH] D66332: [clang-format] Fix the bug that joins template closer and > or >>

2019-08-16 Thread Owen Pan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGac67414618df: [clang-format] Fix the bug that joins template closer and > or >> (authored by owenpan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66332/ne

r369161 - [doc] Fix some minor formatting issues.

2019-08-16 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Aug 16 15:08:39 2019 New Revision: 369161 URL: http://llvm.org/viewvc/llvm-project?rev=369161&view=rev Log: [doc] Fix some minor formatting issues. Modified: cfe/trunk/docs/LanguageExtensions.rst Modified: cfe/trunk/docs/LanguageExtensions.rst URL: http://llvm.org/v

[PATCH] D65997: Add options rounding and exceptions to pragma fp

2019-08-16 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor added inline comments. Comment at: clang/docs/LanguageExtensions.rst:3152 +rounding mode. This option is experimental; the compiler may ignore an explicit +rounding mode in some situations. + sepavloff wrote: > andrew.w.kaylor wrote: > > You shoul

[PATCH] D66092: [CodeGen] Generate constrained fp intrinsics depending on FPOptions

2019-08-16 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor added a comment. In D66092#1632642 , @sepavloff wrote: > - What is the issue with moving `a = b/c`? If it moves ahead of `if` > statement it seems OK, because the rounding mode is the same in that point. > It cannot be moved inside the bl

[PATCH] D66364: Diagnose use of _Thread_local as an extension when appropriate

2019-08-16 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. `_Thread_local` is a reserved identifier; we generally don't produce extension warnings for uses of reserved identifiers. (Eg, there's no warning for `_Atomic` in C++ or `_Bool` in C89, and no warning for uses of `__type_traits` or `__builtins`.) But I note that we *do*

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-08-16 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 215693. xbolva00 added a comment. Better comparison for "xor". CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63423/new/ https://reviews.llvm.org/D63423 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D66122: [CodeGen] Emit dynamic initializers for static TLS vars in outlined scopes

2019-08-16 Thread Princeton Ferro via Phabricator via cfe-commits
Prince781 updated this revision to Diff 215695. Prince781 added a comment. Herald added a subscriber: mgrang. I've updated the patch to initialize, in the proper order, all foreign static TLS variables and the variables they depend on for initialization. I've also cleaned up the patch a bit. R

[PATCH] D63889: Check possible warnings on global initializers for reachability

2019-08-16 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 215699. Nathan-Huckleberry added a comment. - Use ExprEvalContext and remove mangling context code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63889/new/ https://reviews.llvm.org/D63889 Files: c

[PATCH] D63889: Check possible warnings on global initializers for reachability

2019-08-16 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry marked 4 inline comments as done. Nathan-Huckleberry added inline comments. Comment at: clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:360 -constexpr int ok_byte = (__builtin_bit_cast(std::byte[8], pad{1, 2}), 0); -constexpr int ok_uchar = (__builtin_bit_c

[PATCH] D66092: [CodeGen] Generate constrained fp intrinsics depending on FPOptions

2019-08-16 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor added a comment. It took some digging, but I finally found the e-mail thread where we initially agreed that we can't mix constrained FP intrinsics and non-constrained FP operations within a function. Here it is: http://lists.llvm.org/pipermail/cfe-dev/2017-August/055325.html R

[PATCH] D65037: push LR before mcount on ARM

2019-08-16 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 215703. jcai19 added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fix frontend unit tests for __gnu_mcount_nc. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65037/new/ https:

[PATCH] D66122: [CodeGen] Emit dynamic initializers for static TLS vars in outlined scopes

2019-08-16 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:472 + + llvm::sort(OrderedVarInits.begin(), OrderedVarInits.end(), + [&VarInitDependencies](const VarDecl *a, const VarDecl *b) { You can use the range-based version of llvm::so

r369170 - Revert "[X86] Support -mlong-double-80"

2019-08-16 Thread Troy A. Johnson via cfe-commits
Author: troyj Date: Fri Aug 16 16:18:22 2019 New Revision: 369170 URL: http://llvm.org/viewvc/llvm-project?rev=369170&view=rev Log: Revert "[X86] Support -mlong-double-80" This reverts commit 250aafa2c4a1bc2395edfe8d4365545bbe56fffe. Caused buildbot failures -- still investigating. Modified:

[PATCH] D66122: [CodeGen] Emit dynamic initializers for static TLS vars in outlined scopes

2019-08-16 Thread Princeton Ferro via Phabricator via cfe-commits
Prince781 updated this revision to Diff 215709. Prince781 added a comment. Use range-based version of llvm::sort Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66122/new/ https://reviews.llvm.org/D66122 Files: clang/lib/CodeGen/CGExpr.cpp clang

[PATCH] D65019: [ARM] push LR before __gnu_mcount_nc

2019-08-16 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 215710. jcai19 added a comment. Fix frontend mcount unit tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65019/new/ https://reviews.llvm.org/D65019 Files: clang/lib/Basic/Targets/ARM.cpp clang/test/Fro

r369173 - Reland "[ARM] push LR before __gnu_mcount_nc"

2019-08-16 Thread Jian Cai via cfe-commits
Author: jcai19 Date: Fri Aug 16 16:30:16 2019 New Revision: 369173 URL: http://llvm.org/viewvc/llvm-project?rev=369173&view=rev Log: Reland "[ARM] push LR before __gnu_mcount_nc" This relands r369147 with fixes to unit tests. https://reviews.llvm.org/D65019 Modified: cfe/trunk/lib/Basic/Tar

[PATCH] D59922: [Attributor] Deduce "no-capture" argument attribute

2019-08-16 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 215713. jdoerfert added a comment. Add more test coverage and improve capture information based on dereferenceability Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59922/new/ https://reviews.llvm.org/D59922

[PATCH] D66046: Add new tautological compare warning for bitwise-or with a non-zero constant

2019-08-16 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. Looks great, thank you! Comment at: lib/Analysis/CFG.cpp:1118 +Expr::EvalResult Result; +if (!Constant->EvaluateAsInt(Result, *Context)) + return {};

[PATCH] D65019: [ARM] push LR before __gnu_mcount_nc

2019-08-16 Thread Jian Cai via Phabricator via cfe-commits
jcai19 closed this revision. jcai19 added a comment. Upsteamed to r369173. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65019/new/ https://reviews.llvm.org/D65019 ___ cfe-commits mailing list cfe-comm

[PATCH] D59922: [Attributor] Deduce "no-capture" argument attribute

2019-08-16 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 215716. jdoerfert added a comment. Add tests accidentally removed Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59922/new/ https://reviews.llvm.org/D59922 Files: llvm/include/llvm/Transforms/IPO/Attributor

[PATCH] D66045: Improve detection of same value in comparisons

2019-08-16 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. Thanks from me as well. Comment at: lib/AST/Expr.cpp:4009 + auto getAnyDecl = [](const Expr *E) -> const ValueDecl * { +if (auto *DRE = dyn_cast(E)) + return

[PATCH] D65907: Introduce FileEntryRef and use it when handling includes to report correct dependencies when the FileManager is reused across invocations

2019-08-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: clang/include/clang/Basic/FileManager.h:110 +/// A reference to a \c FileEntry that includes the name of the file as it was +/// accessed by the FileManager's client. +class FileEntryRef { bruno wrote: > How does that w

[PATCH] D65907: Introduce FileEntryRef and use it when handling includes to report correct dependencies when the FileManager is reused across invocations

2019-08-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 215718. arphaman marked 8 inline comments as done. arphaman added a comment. Address review comments and proper `use-external-names` support. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65907/new/ https://reviews.llvm.org/

[PATCH] D65907: Introduce FileEntryRef and use it when handling includes to report correct dependencies when the FileManager is reused across invocations

2019-08-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 215719. arphaman added a comment. remove accidentally include diff's `.rej` file. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65907/new/ https://reviews.llvm.org/D65907 Files: clang/include/clang/Basic/FileManager.h clang/include/clang/Basic

[PATCH] D66044: Extend -Wtautological-overlap-compare to accept negative values and integer conversions

2019-08-16 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. //*appreciates CFG tests*// Comment at: test/Analysis/cfg.cpp:504-506 +// CHECK-NEXT: 2: return [B2.1]; +// CHECK-NEXT: Preds (1): B3(Unreachable) +// CHECK-NEXT: Succs (1): B0 Looks like runaway f

[PATCH] D66332: [clang-format] Fix the bug that joins template closer and > or >>

2019-08-16 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. In D66332#1633749 , @owenpan wrote: > Do you have `SpaceBeforeAssignmentOperators` off? Yes; I mean, that's what I tested in order to produce the buggy behavior. I don't believe anyone should be using that option in producti

[PATCH] D64943: [Clang][OpenMP offload] Eliminate use of OpenMP linker script

2019-08-16 Thread Vyacheslav Zakharin via Phabricator via cfe-commits
vzakhari added a comment. FYI, llvm.global_dtor fix is in https://reviews.llvm.org/D66373 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64943/new/ https://reviews.llvm.org/D64943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[PATCH] D66364: Diagnose use of _Thread_local as an extension when appropriate

2019-08-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D66364#1633775 , @rsmith wrote: > `_Thread_local` is a reserved identifier; we generally don't produce > extension warnings for uses of reserved identifiers. (Eg, there's no warning > for `_Atomic` in C++ or `_Bool` in C

[PATCH] D66122: [CodeGen] Emit dynamic initializers for static TLS vars in outlined scopes

2019-08-16 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > in the proper order I would prefer lexical order, if possible. (At least, the order should be deterministic.) > clang should either generate an error or do "the right thing." Agreed. I think we should send a defect report to the C++ standards committee to clarify

[PATCH] D64943: [Clang][OpenMP offload] Eliminate use of OpenMP linker script

2019-08-16 Thread Sergey Dmitriev via Phabricator via cfe-commits
sdmitriev marked 2 inline comments as done. sdmitriev added inline comments. Comment at: clang/tools/clang-offload-wrapper/ClangOffloadWrapper.cpp:72 +private: + IntegerType *getSizeTTy() { +switch (M.getDataLayout().getPointerTypeSize(Type::getInt8PtrTy(C))) { -

[clang-tools-extra] r369182 - [clang-doc] Fix casting not working in gcc 5.4.0

2019-08-16 Thread Diego Astiazaran via cfe-commits
Author: diegoastiazaran Date: Fri Aug 16 18:45:03 2019 New Revision: 369182 URL: http://llvm.org/viewvc/llvm-project?rev=369182&view=rev Log: [clang-doc] Fix casting not working in gcc 5.4.0 An implicit cast of std::string to llvm::SmallString<> was breaking GCC 5.4.0 builder. A pair using llvm:

[PATCH] D66378: [clang-doc] Fix casting not working in gcc 5.4.0

2019-08-16 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran created this revision. DiegoAstiazaran added a project: clang-tools-extra. An implicit cast of std::string to llvm::SmallString<> was breaking GCC 5.4.0 builder. A pair using llvm::SmallString<> now uses std::string. https://reviews.llvm.org/D66378 Files: clang-tools-extra/cl

[PATCH] D62731: [RFC] Add support for options -fp-model= and -fp-speculation= : specify floating point behavior

2019-08-16 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:126 + case LangOptions::FPM_Precise: + case LangOptions::FPM_Fast: +break; mibintc wrote: > mibintc wrote: > > kpn wrote: > > > Wait, so "fast" and "precise" are the sa

[PATCH] D66378: [clang-doc] Fix casting not working in gcc 5.4.0

2019-08-16 Thread Diego Astiazarán via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL369182: [clang-doc] Fix casting not working in gcc 5.4.0 (authored by DiegoAstiazaran, committed by ). Herald added a proj

[PATCH] D66378: [clang-doc] Fix casting not working in gcc 5.4.0

2019-08-16 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett added a comment. LGTM, for posterity Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66378/new/ https://reviews.llvm.org/D66378 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[PATCH] D66324: clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM

2019-08-16 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth updated this revision to Diff 215734. paulkirth added a comment. Remove frontend components of clang-misexpect in favor of backend implementations Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66324/new/ https://reviews.llvm.org/D66324

r369183 - [X86] Support -mlong-double-80

2019-08-16 Thread Troy A. Johnson via cfe-commits
Author: troyj Date: Fri Aug 16 21:20:24 2019 New Revision: 369183 URL: http://llvm.org/viewvc/llvm-project?rev=369183&view=rev Log: [X86] Support -mlong-double-80 Add an option group for all of the -mlong-double-* options and make -mlong-double-80 restore the default long double behavior for X86.

[PATCH] D66046: Add new tautological compare warning for bitwise-or with a non-zero constant

2019-08-16 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. You should also probably add a note in the release notes (maybe for the others changes too) thanks for the work btw! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66046/new/ https://reviews.llvm.org/D66046

[PATCH] D66332: [clang-format] Fix the bug that joins template closer and > or >>

2019-08-16 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. > Are there any other clang-format options that might lead to a lack-of-space > before `>`, `>=`, `==`, or `=`? I brought up `enable_if_t=0` > because that specifically is a construction I've run into in my own code, > even though I've never tried to clang-format it, le

<    1   2