[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:

[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

[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? > > >

[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

[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-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:

[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:

[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.

[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

[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] 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:

[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:

[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] 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

[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

[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] 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] 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

[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

[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

[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] 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:

[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] 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

[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

[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=157314#toc Repository: rC

[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] 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

[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

[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

[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:

[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-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:

[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

[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 //

[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 ==

[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

[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:

[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

[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-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=170478#toc

[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:

[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

[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

[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:

[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

[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

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

2018-10-04 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: lib/Sema/SemaExpr.cpp:15604 +public EvaluatedExprVisitor { + Sema + ../tools/clang/lib/Sema/SemaExpr.cpp:15619:13: warning: private field 'S' is not used [-Wunused-private-field] Sema

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

2018-10-04 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: lib/Sema/SemaExpr.cpp:15621-15623 +for (InitListExpr::iterator II = E->begin(), IE = E->end(); + II != IE; ++II) + Visit(*II); void wrote: > nickdesaulniers wrote: > >

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

2018-10-04 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: lib/Sema/SemaExpr.cpp:15621-15623 +for (InitListExpr::iterator II = E->begin(), IE = E->end(); + II != IE; ++II) + Visit(*II); `std::for_each`? https://reviews.llvm.org/D52854

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

2018-10-04 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: lib/Sema/SemaExpr.cpp:15621-15623 +for (InitListExpr::iterator II = E->begin(), IE = E->end(); + II != IE; ++II) + Visit(*II); nickdesaulniers wrote: > `std::for_each`? Sorry, posted

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

2018-10-04 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: test/Sema/builtins.c:125 +// __builtin_constant_p cannot resolve non-constants as a file scoped array. +int expr; such as Otherwise it's possible to read this as the non-constants being resolved to a file

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

2018-10-04 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: lib/Sema/SemaExpr.cpp:15621-15623 +for (InitListExpr::iterator II = E->begin(), IE = E->end(); + II != IE; ++II) + Visit(*II); nickdesaulniers wrote: > void wrote: > >

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

2018-10-08 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. nickdesaulniers added a reviewer: jfb. Herald added a subscriber: cfe-commits. https://reviews.llvm.org/D53000 adds a special exit code for SIGPIPE (writing to a closed reader), and rather than print a fatal warning, skips printing the error. Fixes

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

2018-10-08 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 168733. nickdesaulniers added a comment. - return error code 74 (EX_IOERR) if observed Repository: rC Clang https://reviews.llvm.org/D53001 Files: lib/Driver/Driver.cpp Index: lib/Driver/Driver.cpp

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

2018-10-08 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: lib/Driver/Driver.cpp:1406 +// for SIGPIPE. Do not print diagnostics for this case. +if (Res == 71) + continue; jfb wrote: > jfb wrote: > > Ditto on magical number in a header. > I think you want to

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

2018-10-08 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 168728. nickdesaulniers added a comment. - prefer EX_IOERR from sysexits.h Repository: rC Clang https://reviews.llvm.org/D53001 Files: lib/Driver/Driver.cpp Index: lib/Driver/Driver.cpp

[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

[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}}

[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

[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 ___

[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 ) { + if (Arg *A = Args.getLastArg(options::OPT_mlittle_endian, + options::OPT_mbig_endian)) {

[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

[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:

[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 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] D52849: [SEMA] split ExtWarn dupl-decl-spec's into Extension and ExtWarn

2018-10-03 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. nickdesaulniers added a reviewer: rsmith. Herald added a subscriber: cfe-commits. For types deduced from typedef's and typeof's, don't warn for duplicate declaration specifiers in C90 unless -pedantic. Create a third diagnostic type for duplicate

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

2018-10-03 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Created: https://reviews.llvm.org/D52849 Repository: rC Clang https://reviews.llvm.org/D52248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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

[PATCH] D52849: [SEMA] split ExtWarn dupl-decl-spec's into Extension and ExtWarn

2018-10-03 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Thanks for your suggestions and code review. I appreciate it. Repository: rL LLVM https://reviews.llvm.org/D52849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D52849: [SEMA] split ExtWarn dupl-decl-spec's into Extension and ExtWarn

2018-10-03 Thread Nick Desaulniers via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343740: [SEMA] split ExtWarn dupl-decl-specs into Extension and ExtWarn (authored by nickdesaulniers, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

[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

[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 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 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-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

[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

[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:

[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

[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

[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

[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 ___

[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

[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):

[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

[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] 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

[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

[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?

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

2019-01-09 Thread Nick Desaulniers via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. nickdesaulniers marked an inline comment as done. Closed by commit rL350776: [Sema] Mark target of __attribute__((alias(target))) used for C (authored by nickdesaulniers, committed by ). Herald added a subscriber:

[PATCH] D56522: [SemaCXX] add -Woverride-init alias to -Winitializer-overrides

2019-01-09 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. nickdesaulniers added a reviewer: rsmith. Herald added a subscriber: cfe-commits. https://bugs.llvm.org/show_bug.cgi?id=40251 https://github.com/ClangBuiltLinux/linux/issues/307 Repository: rC Clang https://reviews.llvm.org/D56522 Files:

  1   2   3   >