[PATCH] D50467: [SEMA] add more -Wfloat-conversion to compound assigment analysis

2018-08-08 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. Herald added a subscriber: cfe-commits. Fixes Bug: https://bugs.llvm.org/show_bug.cgi?id=27061 Repository: rC Clang https://reviews.llvm.org/D50467 Files: lib/Sema/SemaChecking.cpp test/SemaCXX/warn-float-conversion.cpp Index: test/SemaCXX/warn-flo

[PATCH] D50467: [SEMA] add more -Wfloat-conversion to compound assigment analysis

2018-08-08 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 159763. nickdesaulniers added a comment. - rework ordering of conditionals to reduce indentation Repository: rC Clang https://reviews.llvm.org/D50467 Files: lib/Sema/SemaChecking.cpp test/SemaCXX/warn-float-conversion.cpp Index: test/SemaCXX

[PATCH] D50467: [SEMA] add more -Wfloat-conversion to compound assigment analysis

2018-08-08 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: lib/Sema/SemaChecking.cpp:10413-10416 + // If source is floating point but target is not. + if (!ResultBT->isFloatingPoint()) +return DiagnoseFloatingImpCast(S, E, E->getRHS()->getType(), +

[PATCH] D50467: [SEMA] add more -Wfloat-conversion to compound assigment analysis

2018-08-08 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: lib/Sema/SemaChecking.cpp:10411 +->getAs(); + if (!ResultBT || !(RBT && RBT->isFloatingPoint())) return; + pirama wrote: > Add a comment explaining this conditional as well? > > > Retu

[PATCH] D50467: [SEMA] add more -Wfloat-conversion to compound assigment analysis

2018-08-08 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: lib/Sema/SemaChecking.cpp:10411 +->getAs(); + if (!ResultBT || !(RBT && RBT->isFloatingPoint())) return; + nickdesaulniers wrote: > pirama wrote: > > Add a comment explaining this conditi

[PATCH] D50467: [SEMA] add more -Wfloat-conversion to compound assigment analysis

2018-08-08 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 159820. nickdesaulniers added a comment. - clean up conditional and add comment Repository: rC Clang https://reviews.llvm.org/D50467 Files: lib/Sema/SemaChecking.cpp test/SemaCXX/warn-float-conversion.cpp Index: test/SemaCXX/warn-float-conve

[PATCH] D50467: [SEMA] add more -Wfloat-conversion to compound assigment analysis

2018-08-10 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: lib/Sema/SemaChecking.cpp:10424 + // We don't want to warn for system macro. + S.SourceMgr.isInSystemMacro(E->getOperatorLoc())) +// warn about dropping FP rank. aaron.ballman wrote: > This looks in

[PATCH] D50467: [SEMA] add more -Wfloat-conversion to compound assigment analysis

2018-08-10 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 160191. nickdesaulniers added a comment. - fix up system macro case and add test coverage for that case. Repository: rC Clang https://reviews.llvm.org/D50467 Files: lib/Sema/SemaChecking.cpp test/SemaCXX/warn-float-conversion.cpp Index: test

[PATCH] D50467: [SEMA] add more -Wfloat-conversion to compound assigment analysis

2018-08-10 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers marked 3 inline comments as done. nickdesaulniers added a comment. Thanks for the info, I found https://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html helpful. How does this look? Repository: rC Clang https://reviews.llvm.org/D50467 _

[PATCH] D50467: [SEMA] add more -Wfloat-conversion to compound assigment analysis

2018-08-13 Thread Nick Desaulniers via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL339581: [SEMA] add more -Wfloat-conversion to compound assigment analysis (authored by nickdesaulniers, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm

[PATCH] D50467: [SEMA] add more -Wfloat-conversion to compound assigment analysis

2018-08-13 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Thank you for the code review. Repository: rL LLVM https://reviews.llvm.org/D50467 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50647: [Sema] fix -Wfloat-conversion test case.

2018-08-13 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. nickdesaulniers added reviewers: aaron.ballman, gkistanova. Herald added a subscriber: cfe-commits. Fixes commit 6bbde717f7fb ("[SEMA] add more -Wfloat-conversion to compound assigment analysis"). This test case was caught in postsubmit testing. Repository

[PATCH] D50647: [Sema] fix -Wfloat-conversion test case.

2018-08-13 Thread Nick Desaulniers via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL339593: [Sema] fix -Wfloat-conversion test case. (authored by nickdesaulniers, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D50647 Files: cfe

[PATCH] D50805: Don't warn on returning the address of a label from a statement expression

2018-08-17 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Thank you for this! https://reviews.llvm.org/D50805 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D51011: [Preprocessor] raise gcc compatibility macros.

2018-08-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. nickdesaulniers added a reviewer: aaron.ballman. Herald added a subscriber: cfe-commits. Building the Linux kernel with clang is now broken as of commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6"). We were getting lucky that Clang previous

[PATCH] D51011: [Preprocessor] raise gcc compatibility macros.

2018-08-21 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Richard, Thanks for the review, context, and suggestions. I appreciate it. > Can you instead change the kernel to require GCC >= 4.6 or some suitable > version of Clang? Can you help me create an accurate C preprocessor check that the compiler in use is actual

[PATCH] D51011: [Preprocessor] raise gcc compatibility macros.

2018-08-21 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Thanks Eli. I wholeheartedly prefer feature detection to explicit version checks. One thing that makes this hard is the lack of __has_attribute in gcc: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66970. Repository: rC Clang https://reviews.llvm.org/D51011

[PATCH] D51011: [Preprocessor] raise gcc compatibility macros.

2018-08-23 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Kernel patch: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=815f0ddb346c196018d4d8f8f55c12b83da1de3f Thanks Eli and Richard, I appreciate it. Repository: rC Clang https://reviews.llvm.org/D51011

[PATCH] D51190: [AttrDocs]: document gnu_inline function attribute

2018-08-23 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. nickdesaulniers added a reviewer: rsmith. Herald added a subscriber: cfe-commits. This wasn't documented https://clang.llvm.org/docs/AttributeReference.html, and briefly mentioned https://clang.llvm.org/docs/UsersManual.html#differences-between-various-stan

[PATCH] D51190: [AttrDocs]: document gnu_inline function attribute

2018-08-23 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 162291. nickdesaulniers added a comment. - link to correct doc Repository: rC Clang https://reviews.llvm.org/D51190 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td Index: include/clang/Basic/AttrDocs.td ==

[PATCH] D51190: [AttrDocs]: document gnu_inline function attribute

2018-08-27 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 162752. nickdesaulniers added a comment. - explicitly mention extern inline Repository: rC Clang https://reviews.llvm.org/D51190 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td Index: include/clang/Basic/AttrDocs.td =

[PATCH] D51190: [AttrDocs]: document gnu_inline function attribute

2018-08-27 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 162761. nickdesaulniers added a comment. - s/c89/GNU inline extension/g and mention -std=gnu89/-fgnu89-inline Repository: rC Clang https://reviews.llvm.org/D51190 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td Index: inc

[PATCH] D51190: [AttrDocs]: document gnu_inline function attribute

2018-08-28 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 162908. nickdesaulniers added a comment. - Take rsmith's sugguested wording. Add info about __GNUC_STDC_INLINE__. Repository: rC Clang https://reviews.llvm.org/D51190 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td Index:

[PATCH] D51190: [AttrDocs]: document gnu_inline function attribute

2018-08-29 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 163215. nickdesaulniers added a comment. - link to correct doc - explicitly mention extern inline - s/c89/GNU inline extension/g and mention -std=gnu89/-fgnu89-inline - Take rsmith's sugguested wording. Add info about __GNUC_STDC_INLINE__. - some final

[PATCH] D51190: [AttrDocs]: document gnu_inline function attribute

2018-08-29 Thread Nick Desaulniers via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340987: [AttrDocs]: document gnu_inline function attribute (authored by nickdesaulniers, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D51190 Fi

[PATCH] D48581: [AArch64] Support reserving x1-7 registers.

2018-09-10 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers accepted this revision. nickdesaulniers added a comment. This revision is now accepted and ready to land. Thanks for the other half of this feature! Comment at: test/Driver/aarch64-fixed-x-register.c:35 +// RUN: FileCheck --check-prefix=CHECK-FIXED-X20 < %t %s +

[PATCH] D48581: [AArch64] Support reserving x1-7 registers.

2018-09-12 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers accepted this revision. nickdesaulniers added a comment. Great work Tri, thank you! https://reviews.llvm.org/D48581 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49760: [clang:sema] de-duplicate getDepthAndIndex helpers

2018-07-24 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. nickdesaulniers added reviewers: srhines, pirama. Herald added a subscriber: cfe-commits. Continuing off of: https://reviews.llvm.org/D38382 Fixes: https://bugs.llvm.org/show_bug.cgi?id=12176 Repository: rC Clang https://reviews.llvm.org/D49760 Files:

[PATCH] D49760: [clang:sema] de-duplicate getDepthAndIndex helpers

2018-07-24 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 157134. nickdesaulniers added a comment. - prefer auto when type is specified on RHS of assignment. Repository: rC Clang https://reviews.llvm.org/D49760 Files: include/clang/Sema/SemaInternal.h lib/Sema/SemaTemplateDeduction.cpp lib/Sema/Se

[PATCH] D49760: [clang:sema] de-duplicate getDepthAndIndex helpers

2018-07-24 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers marked an inline comment as done. nickdesaulniers added a comment. Thanks for the review. Today is my first day committing to clang! Repository: rC Clang https://reviews.llvm.org/D49760 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D49760: [clang:sema] de-duplicate getDepthAndIndex helpers

2018-07-25 Thread Nick Desaulniers via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337944: [clang:sema] de-duplicate getDepthAndIndex helpers (authored by nickdesaulniers, committed by ). Changed prior to commit: https://reviews.llvm.org/D49760?vs=157134&id=157314#toc Repository: r

[PATCH] D52784: [ARM][AArch64] Pass through endianness flags to the GNU assembler

2018-10-10 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. I think we should pass these flags along to the linker, too. Not just the assembler. Maybe within tools::gnutools::Linker::ConstructJob() within lib/Driver/ToolChains/Gnu.cpp? https://reviews.llvm.org/D52784 ___ c

[PATCH] D52784: [ARM][AArch64] Pass through endianness flags to the GNU assembler

2018-10-10 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: lib/Driver/ToolChains/Gnu.cpp:543-549 +static const char* GetEndianArg(bool IsBigEndian, const ArgList &Args) { + if (Arg *A = Args.getLastArg(options::OPT_mlittle_endian, + options::OPT_mbig_endian

[PATCH] D53001: [Driver] check for exit code from SIGPIPE

2018-10-12 Thread Nick Desaulniers via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL344375: [Driver] check for exit code from SIGPIPE (authored by nickdesaulniers, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D53001 Files: cf

[PATCH] D52784: [ARM][AArch64] Pass through endianness flags to the GNU assembler and linker

2018-10-12 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Thanks for the addition of the flags to the linker. Interesting note about `-m*-endian` only being applicable for armv7. Just some minor nits left. With the current version of the patch, I can now assemble, link, and boot in a virtualized environment a big-endi

[PATCH] D52784: [ARM][AArch64] Pass through endianness flags to the GNU assembler and linker

2018-10-12 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: lib/Driver/ToolChains/Gnu.cpp:357-364 +const char* EndianFlag = "-EL"; +if (isArmBigEndian(Triple, Args)) { + EndianFlag = "-EB"; + arm::appendBE8LinkFlag(Args, CmdArgs, Triple); +} +else if (Arch == llv

[PATCH] D53001: [Driver] check for exit code from SIGPIPE

2018-10-12 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. @rnk has reverted this due to breaking the windows build (sysexits.h) is not available there. Repository: rL LLVM https://reviews.llvm.org/D53001 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lis

[PATCH] D53001: [Driver] check for exit code from SIGPIPE

2018-10-12 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: cfe/trunk/lib/Driver/Driver.cpp:81-85 +#include #include #if LLVM_ON_UNIX #include // getpid #endif @rnk || @majnemer thoughts on making this: ``` #if LLVM_ON_UNIX ​#include // getpid #include // EX_IOE

[PATCH] D53210: Revert 344389 "Revert r344375 "[Driver] check for exit code from SIGPIPE""

2018-10-12 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. nickdesaulniers added reviewers: rnk, majnemer, jfb. Herald added a subscriber: cfe-commits. Add preprocessor guards for UNIX. This reverts commit c2275676c1bde4ed20c06affdeeb1a93692f29a8. Repository: rC Clang https://reviews.llvm.org/D53210 Files: l

[PATCH] D53001: [Driver] check for exit code from SIGPIPE

2018-10-12 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers marked an inline comment as done. nickdesaulniers added inline comments. Comment at: cfe/trunk/lib/Driver/Driver.cpp:81-85 +#include #include #if LLVM_ON_UNIX #include // getpid #endif nickdesaulniers wrote: > @rnk || @majnemer thoughts on

[PATCH] D53210: Revert 344389 "Revert r344375 "[Driver] check for exit code from SIGPIPE""

2018-10-15 Thread Nick Desaulniers via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC344536: Revert 344389 "Revert r344375 "[Driver] check for exit code from SIGPIPE"" (authored by nickdesaulniers, committed by ). Changed prior to commit: https://reviews.llvm.org/D53210?vs=169474&id=16

[PATCH] D52784: [ARM][AArch64] Pass through endianness flags to the GNU assembler and linker

2018-10-15 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers accepted this revision. nickdesaulniers added a comment. This revision is now accepted and ready to land. Thanks for this patch. With it I was able to link+boot a BE aarch64 Linux kernel (and a LE aarch64 Linux kernel). Comment at: lib/Driver/ToolChains/Gnu.cp

[PATCH] D53210: Revert 344389 "Revert r344375 "[Driver] check for exit code from SIGPIPE""

2018-10-15 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. I think this is now breaking: lld :: ELF/format-binary.test lld :: ELF/relocatable-versioned.s Repository: rC Clang https://reviews.llvm.org/D53210 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://li

[PATCH] D53210: Revert 344389 "Revert r344375 "[Driver] check for exit code from SIGPIPE""

2018-10-15 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Nevermind, looks like flaky tests. Will try to repro and contact msan maintainers. Repository: rC Clang https://reviews.llvm.org/D53210 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.o

[PATCH] D52784: [ARM][AArch64] Pass through endianness flags to the GNU assembler and linker

2018-10-16 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Thanks again for this patch! Repository: rC Clang https://reviews.llvm.org/D52784 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D53463: [Driver] allow Android triples to alias for non Android targets

2018-10-19 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. nickdesaulniers added reviewers: srhines, pirama, danalbert. Herald added subscribers: cfe-commits, kristof.beyls, javed.absar. Partial revert of r330873 ('[Driver] Reland "Android triples are not aliases for other triples."') While we don't want `-target aa

[PATCH] D53463: [Driver] allow Android triples to alias for non Android targets

2018-10-22 Thread Nick Desaulniers via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC344941: [Driver] allow Android triples to alias for non Android targets (authored by nickdesaulniers, committed by ). Changed prior to commit: https://reviews.llvm.org/D53463?vs=170283&id=170478#toc Re

[PATCH] D53529: [Driver] fix broken test

2018-10-22 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. nickdesaulniers added reviewers: srhines, danalbert. Herald added a subscriber: cfe-commits. Fixes test from r344941 which was broken on Windows. We want to check the selected toolchain rather than the found toolchain anyways. Repository: rC Clang https:

[PATCH] D53529: [Driver] fix broken test

2018-10-22 Thread Nick Desaulniers via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL344958: [Driver] fix broken test (authored by nickdesaulniers, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D53529 Files: cfe/trunk/test/Driv

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in LLVM

2019-01-10 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Thanks for all the work that went into this patch, both initially and rebasing! Comment at: lib/AST/Stmt.cpp:465 + const LabelDecl *LD = getLabelExpr(i)->getLabel(); + return LD->getName(); +} These 2 statements can probably b

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in LLVM

2019-01-11 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: lib/Parse/ParseStmtAsm.cpp:830-858 + if (AteExtraColon || Tok.is(tok::colon)) { +if (AteExtraColon) + AteExtraColon = false; +else + ConsumeToken(); + +if (!AteExtraColon && Tok.isNot(tok::identifier)) { --

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-01-15 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. With this patch, DD53765, and one out of tree kernel patch to work around a separate issue , I can confirm that I can compile, link, and boot an x86_64 Linux kernel with C

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-01-17 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Also of note: glib, a super popular library used across many Linux distro's will benefit from the implementation of asm goto (I will send them a patch to fix their version detection once we land in Clang): https://github.com/GNOME/glib/blob/1ba843b8a0585f20438d5

[PATCH] D53921: Compound literals and enums require constant inits

2018-10-31 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: lib/Sema/SemaDecl.cpp:16411 // this constant. Skip this enum since it may be ill-formed. -if (!ECD) { - return; -} +if (!ECD) return; probably don't need to adjust this line Repository:

[PATCH] D54188: [Sema] Mark target of __attribute__((alias("target"))) used for C

2018-11-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. nickdesaulniers added a reviewer: rsmith. Herald added subscribers: cfe-commits, erik.pilkington. Prevents -Wunneeded-internal-delcaration warnings when the target has no other references. This occurs frequently in device drivers in the Linux kernel. Sema wo

[PATCH] D54355: Use is.constant intrinsic for __builtin_constant_p

2018-11-19 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:1285 case Expr::ConstantExprClass: case Stmt::ExprWithCleanupsClass: `LLVM_FALLTHROUGH;` ? Repository: rC Clang https://reviews.llvm.org/D54355 _

[PATCH] D54355: Use is.constant intrinsic for __builtin_constant_p

2018-11-19 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:1285 case Expr::ConstantExprClass: case Stmt::ExprWithCleanupsClass: nickdesaulniers wrote: > `LLVM_FALLTHROUGH;` ? nvm, only needed when there's code THEN fallt

[PATCH] D54355: Use is.constant intrinsic for __builtin_constant_p

2018-11-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: lib/AST/ExprConstant.cpp:11391 llvm_unreachable("Invalid StmtClass!"); } @void , I assume this unreachable is the one reported by @uweigand ? Does the above switch need a case statement added? Repository

[PATCH] D53210: Revert 344389 "Revert r344375 "[Driver] check for exit code from SIGPIPE""

2018-11-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Hi @richard.barton.arm , this has landed already. If you click "show older" you'll see the UI element that shows this landed as r344536 (Oct 15 2018). If your clang version is later than r344536 (what will become clang-8) and you still see this, please open a

[PATCH] D38479: Make -mgeneral-regs-only more like GCC's

2018-11-27 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Bump, this is still listed as a TODO in the Linux kernel that works around the issue. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D38479/new/ https://reviews.llvm.org/D38479 ___ cfe-commits mailing list cf

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-03-04 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Should the langref be updated (specifically the section on blockaddress): This value only has defined behavior when used as an operand to the ‘indirectbr’ instruction, or for comparisons against null. https://reviews.llvm.org/D53765 touched the langref, but I

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-03-04 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. needs another rebase CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56571/new/ https://reviews.llvm.org/D56571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-03-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. > which is making things hard for the folks testing this with the Linux kernel > and needing to apply this patch themselves. If we can get inlining of callbr working first before landing this, then all of our CI won't go immediately red (as it would from landing

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

2019-03-21 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. This is causing false positive warnings for the Linux kernel: https://github.com/ClangBuiltLinux/linux/issues/423 :( https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/statfs.c#n128 Consider this untested case: if (sizeof(buf) == s

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

2019-03-22 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D58797#1439888 , @erik.pilkington wrote: > Ah, I didn't consider that case. Presumably `st` is configured to have > different sizes based on the target? Yes; sorry I was not clear about that in my example. > I agree

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

2019-03-27 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D58797#1443856 , @erik.pilkington wrote: > I added it in r357041. LGTM, thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58797/new/ https://reviews.llvm.org/D58797 __

[PATCH] D60059: [Driver] implement -feverything

2019-04-01 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. nickdesaulniers added a reviewer: rsmith. Herald added subscribers: llvm-commits, cfe-commits, jdoerfert. Herald added projects: clang, LLVM. Due to the wild popularity of -Weverything (used for enabling all warnings), we're back for round 2 (electric boogalo

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-04-03 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Note that with: 1. https://reviews.llvm.org/D60208 ("[X86] Extend boolean arguments to inline-asm according to getBooleanType") 2. https://reviews.llvm.org/D58260 ("[INLINER] allow inlining of blockaddresses if sole uses are callbrs") 3. https://reviews.llvm.o

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-04-23 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. @compudj email me the preprocessed output of basic_percpu_ops_test.c and I'll take a look. (Should be able to find my email via `git log`). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56571/new/ https://reviews.llvm.org/D56571 _

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-04-25 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D56571#1477992 , @jyu2 wrote: > Please let me know if that is clang problem. It's an orthogonal issue with Clang's integrated assembler. @compudj confirmed that setting `-no-integrated-as` solves the issue (which is w

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-05-04 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Also: https://reviews.llvm.org/D61560 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56571/new/ https://reviews.llvm.org/D56571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-18 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. nickdesaulniers added reviewers: srhines, gbiv. Herald added a reviewer: george.burgess.iv. Herald added a subscriber: cfe-commits. nickdesaulniers removed a reviewer: gbiv. Fixes PR32985. Repository: rC Clang https://reviews.llvm.org/D52248 Files: li

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-18 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 166035. nickdesaulniers added a comment. git-clang-format HEAD~ Repository: rC Clang https://reviews.llvm.org/D52248 Files: lib/Sema/SemaType.cpp test/Sema/gnu89.c Index: test/Sema/gnu89.c ===

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 166352. nickdesaulniers added a comment. - git-clang-format HEAD~ Repository: rC Clang https://reviews.llvm.org/D52248 Files: lib/Sema/SemaType.cpp test/Sema/gnu89.c Index: test/Sema/gnu89.c =

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 166355. nickdesaulniers added a comment. - move test to new file, use check-prefix for both cases Repository: rC Clang https://reviews.llvm.org/D52248 Files: lib/Sema/SemaType.cpp test/Sema/gnu89-const.c Index: test/Sema/gnu89-const.c =

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 166357. nickdesaulniers added a comment. - add line numbers to match specific warning lines Repository: rC Clang https://reviews.llvm.org/D52248 Files: lib/Sema/SemaType.cpp test/Sema/gnu89-const.c Index: test/Sema/gnu89-const.c ===

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: test/Sema/gnu89.c:1-2 -// RUN: %clang_cc1 %s -std=gnu89 -pedantic -fsyntax-only -verify +// RUN: %clang_cc1 %s -std=gnu89 -pedantic -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-PEDANTIC %s +// RUN: %clang_cc1 %s -std=gnu89

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: test/Sema/gnu89.c:1-2 -// RUN: %clang_cc1 %s -std=gnu89 -pedantic -fsyntax-only -verify +// RUN: %clang_cc1 %s -std=gnu89 -pedantic -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-PEDANTIC %s +// RUN: %clang_cc1 %s -std=gnu89

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 166351. nickdesaulniers added a comment. - warn only if -pedantic, add gcc bug test cases Repository: rC Clang https://reviews.llvm.org/D52248 Files: lib/Sema/SemaType.cpp test/Sema/gnu89.c Index: test/Sema/gnu89.c =

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-21 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 166578. nickdesaulniers marked an inline comment as done. nickdesaulniers added a comment. - also run test on gnu99+ Repository: rC Clang https://reviews.llvm.org/D52248 Files: lib/Sema/SemaType.cpp test/Sema/gnu89-const.c Index: test/Sema/

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-21 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: lib/Sema/SemaType.cpp:1682 // or via one or more typedefs." -if (!S.getLangOpts().C99 && !S.getLangOpts().CPlusPlus -&& TypeQuals & Result.getCVRQualifiers()) { srhines wrote: > This is broken fo

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-24 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: test/Sema/gnu89.c:1-2 -// RUN: %clang_cc1 %s -std=gnu89 -pedantic -fsyntax-only -verify +// RUN: %clang_cc1 %s -std=gnu89 -pedantic -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-PEDANTIC %s +// RUN: %clang_cc1 %s -std=gnu89

[PATCH] D52399: [AArch64] Support adding X[8-15, 18] registers as CSRs.

2018-09-24 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers accepted this revision. nickdesaulniers added a comment. This revision is now accepted and ready to land. Thanks for this patch, Tri! Repository: rC Clang https://reviews.llvm.org/D52399 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-24 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 166737. nickdesaulniers added a comment. - remove debug statments Repository: rC Clang https://reviews.llvm.org/D52248 Files: lib/Sema/SemaType.cpp test/Sema/gnu89-const.c Index: test/Sema/gnu89-const.c ==

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-24 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 166736. nickdesaulniers added a comment. - add ISO C tests, handle typedef case new tests found Repository: rC Clang https://reviews.llvm.org/D52248 Files: lib/Sema/SemaType.cpp test/Sema/gnu89-const.c Index: test/Sema/gnu89-const.c

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-24 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 166740. nickdesaulniers added a comment. - condense CHECK-prefixes into CHECK for const const Repository: rC Clang https://reviews.llvm.org/D52248 Files: lib/Sema/SemaType.cpp test/Sema/gnu89-const.c Index: test/Sema/gnu89-const.c =

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-24 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: test/Sema/gnu89-const.c:41-46 +CHECK-CNU99-NOT: 27:1: warning: duplicate 'const' declaration specifier +CHECK-CNU99-PEDANTIC-NOT: 27:1: warning: duplicate 'const' declaration specifier +CHECK-CNU11-NOT: 27:1: warning: duplicate

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-24 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 166742. nickdesaulniers added a comment. - fix typo s/CNU/GNU/g and update NOTEs Repository: rC Clang https://reviews.llvm.org/D52248 Files: lib/Sema/SemaType.cpp test/Sema/gnu89-const.c Index: test/Sema/gnu89-const.c ==

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-24 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 166743. nickdesaulniers added a comment. - adjust wording in comment Repository: rC Clang https://reviews.llvm.org/D52248 Files: lib/Sema/SemaType.cpp test/Sema/gnu89-const.c Index: test/Sema/gnu89-const.c ==

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-24 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. This now matches GCC AFAICT. My only question is: Should GCC instead warn for the typedef case for -std=c89 (non pedantic), according to C90 6.5.3? Repository: rC Clang https://reviews.llvm.org/D52248 ___ cfe-c

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-25 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. > Should GCC instead warn for the typedef case for -std=c89 (non pedantic), > according to C90 6.5.3? Seems like yes: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80868#c6 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87435 But let's wait a bit to see what the GCC

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-28 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 167565. nickdesaulniers added a comment. Herald added a subscriber: jfb. - split duplicate_declspec into Extension and Extwarn from Extwarn. - rename ext_duplicate_declspec to be the Extension, not the Extwarn. - Fix C++ case. - Use tablegen'd Extensio

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-28 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Ok, I think this is ready for rereview. Comment at: test/Parser/atomic.c:5 typedef _Atomic int atomic_int; -typedef _Atomic _Atomic _Atomic(int) atomic_int; // expected-warning {{duplicate '_Atomic' declaration specifier}} N

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-28 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: test/FixIt/fixit.c:50 -// CHECK: const typedef int int_t; -const typedef typedef int int_t; // expected-warning {{duplicate 'typedef'}} - Ah, this was a case I should add one last test for. I think reviewers can

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-10-01 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers marked an inline comment as done. nickdesaulniers added inline comments. Comment at: test/FixIt/fixit.c:50 -// CHECK: const typedef int int_t; -const typedef typedef int int_t; // expected-warning {{duplicate 'typedef'}} - nickdesaulniers wrote: >

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-10-01 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 167843. nickdesaulniers marked 2 inline comments as done. nickdesaulniers added a comment. - add back test for typedef typedef - add test for dupl _Atomic and restrict Repository: rC Clang https://reviews.llvm.org/D52248 Files: include/clang/Ba

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-10-01 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 167845. nickdesaulniers marked an inline comment as done. nickdesaulniers added a comment. - move back untouched test case Repository: rC Clang https://reviews.llvm.org/D52248 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Parse/ParseD

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-10-01 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: lib/Sema/DeclSpec.cpp:441-442 else -DiagID = IsExtension ? diag::ext_duplicate_declspec : - diag::warn_duplicate_declspec; +DiagID = IsExtension ? diag::ext_duplicate_declspec +

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-10-03 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 168183. nickdesaulniers added a comment. [SEMA] split ExtWarn dupl-decl-spec's into Extension and ExtWarn For types deduced from typedef's and typeof's, don't warn for duplicate declaration specifiers in C90 unless -pedantic. Create a third diagnosti

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-10-03 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers abandoned this revision. nickdesaulniers added a comment. Well that didn't do what I wanted...(sorry, still learning arc). Going to abandon this and push a much simpler fix. Repository: rC Clang https://reviews.llvm.org/D52248 _

  1   2   3   4   5   6   7   8   9   10   >