[PATCH] D74669: [clang-tidy] New check: misc-no-include-cpp

2020-02-25 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs updated this revision to Diff 246604. jroelofs added a comment. Implement review feedback: - Re-purpose `HeaderFileExtensionsUtils.h` to support headers *and* sources. - Surround file extension in diagnostic with `''`s. I have these as two separate patches locally, but I don't know how

[PATCH] D75489: [clang-tidy] Generalize HeaderFileExtensions.{h, cpp}. NFC

2020-03-02 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs created this revision. jroelofs added reviewers: njames93, aaron.ballman. Herald added subscribers: cfe-commits, xazax.hun, mgorny. Herald added a project: clang. jroelofs added a child revision: D74669: [clang-tidy] New check: bugprone-suspicious-include. jroelofs marked an inline commen

[PATCH] D75489: [clang-tidy] Generalize HeaderFileExtensions.{h, cpp}. NFC

2020-03-02 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs marked an inline comment as done. jroelofs added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/FileExtensionsUtils.h:14 #include "clang/Basic/SourceManager.h" +#include "llvm/ADT/Optional.h" #include "llvm/ADT/SmallSet.h" this belongs

[PATCH] D75489: [clang-tidy] Generalize HeaderFileExtensions.{h, cpp}. NFC

2020-03-02 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs updated this revision to Diff 247762. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75489/new/ https://reviews.llvm.org/D75489 Files: clang-tools-extra/clang-tidy/bugprone/DynamicStaticInitializersCheck.cpp clang-tools-extra/clang-tidy/

[PATCH] D74669: [clang-tidy] New check: bugprone-suspicious-include

2020-03-02 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs updated this revision to Diff 247764. jroelofs added a comment. implement review feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74669/new/ https://reviews.llvm.org/D74669 Files: clang-tools-extra/clang-tidy/bugprone/BugproneTidy

[PATCH] D74669: [clang-tidy] New check: bugprone-suspicious-include

2020-03-02 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs marked 2 inline comments as done. jroelofs added a comment. In D74669#1902107 , @njames93 wrote: > Adding the parent revision means you don't need to have those changes in this > patch. IIUC, that is what I've already done: https://reviews.llv

[PATCH] D75621: [clang-tidy] Use ; as separator for HeaderFileExtensions

2020-03-04 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs created this revision. jroelofs added reviewers: njames93, aaron.ballman. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. https://reviews.llvm.org/D74669#inline-685657 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D75621 Files: clang

[PATCH] D74669: [clang-tidy] New check: bugprone-suspicious-include

2020-03-04 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs updated this revision to Diff 248203. jroelofs added a comment. Split out https://reviews.llvm.org/D75621 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74669/new/ https://reviews.llvm.org/D74669 Files: clang-tools-extra/clang-tidy/bugpr

[PATCH] D75621: [clang-tidy] Use ; as separator for HeaderFileExtensions

2020-03-04 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs updated this revision to Diff 248206. jroelofs added a comment. Fix comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75621/new/ https://reviews.llvm.org/D75621 Files: clang-tools-extra/clang-tidy/bugprone/DynamicStaticInitializers

[PATCH] D74669: [clang-tidy] New check: bugprone-suspicious-include

2020-03-04 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs updated this revision to Diff 248208. jroelofs marked an inline comment as not done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74669/new/ https://reviews.llvm.org/D74669 Files: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.

[PATCH] D74669: [clang-tidy] New check: bugprone-suspicious-include

2020-03-04 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs updated this revision to Diff 248246. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74669/new/ https://reviews.llvm.org/D74669 Files: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp clang-tools-extra/clang-tidy/bugprone/CMa

[PATCH] D75621: [clang-tidy] Use ; as separator for HeaderFileExtensions

2020-03-04 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs updated this revision to Diff 248245. jroelofs added a comment. Preserve backwards compatibility of ',' as a delimiter (for now). > The llvm::StringRef::split function can take multiple split characters, AFAIU, that's for multi-character delimiters, not multiple delimiters. Repository

[PATCH] D75621: [clang-tidy] Use ; as separator for HeaderFileExtensions

2020-03-04 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs updated this revision to Diff 248357. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75621/new/ https://reviews.llvm.org/D75621 Files: clang-tools-extra/clang-tidy/bugprone/DynamicStaticInitializersCheck.cpp clang-tools-extra/clang-tidy/

[PATCH] D75621: [clang-tidy] Use ; as separator for HeaderFileExtensions

2020-03-06 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs updated this revision to Diff 248755. jroelofs added a comment. - Don't spam the deprecation message. Move that to release notes. - Drop unnecessary `const`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75621/new/ https://reviews.llvm.org

[PATCH] D75621: [clang-tidy] Use ; as separator for HeaderFileExtensions

2020-03-06 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs updated this revision to Diff 248757. jroelofs added a comment. - Drop dead include. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75621/new/ https://reviews.llvm.org/D75621 Files: clang-tools-extra/clang-tidy/bugprone/DynamicStaticInit

[PATCH] D75621: [clang-tidy] Use ; as separator for HeaderFileExtensions

2020-03-09 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs marked an inline comment as done. jroelofs added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/FileExtensionsUtils.h:44-46 bool parseFileExtensions(StringRef AllFileExtensions, - FileExtensionsSet &FileExtensions, char Delimiter

[PATCH] D75621: [clang-tidy] Use ; as separator for HeaderFileExtensions

2020-03-09 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs marked an inline comment as done. jroelofs added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/FileExtensionsUtils.h:44-46 bool parseFileExtensions(StringRef AllFileExtensions, - FileExtensionsSet &FileExtensions, char Delimiter

[PATCH] D75621: [clang-tidy] Use ; as separator for HeaderFileExtensions

2020-03-09 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs closed this revision. jroelofs added a comment. https://github.com/llvm/llvm-project/commit/47caa69120e582bf1b795ec646f069c83b0e9456 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75621/new/ https://reviews.llvm.org/D75621 __

[PATCH] D75489: [clang-tidy] Generalize HeaderFileExtensions.{h, cpp}. NFC

2020-03-09 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs closed this revision. jroelofs added a comment. https://github.com/llvm/llvm-project/commit/3486cc014b208df3897cf5656db0d0fdeae26d6b Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75489/new/ https://reviews.llvm.org/D75489 __

[PATCH] D74669: [clang-tidy] New check: bugprone-suspicious-include

2020-03-09 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs updated this revision to Diff 249164. jroelofs added a comment. Fix comment, add docs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74669/new/ https://reviews.llvm.org/D74669 Files: clang-tools-extra/clang-tidy/bugprone/BugproneTidyMod

[PATCH] D74669: [clang-tidy] New check: bugprone-suspicious-include

2020-03-09 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs marked 3 inline comments as done. jroelofs added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/FileExtensionsUtils.h:9 + +#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_HEADER_FILE_EXTENSIONS_UTILS_H +#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_HEA

[PATCH] D74669: [clang-tidy] New check: bugprone-suspicious-include

2020-03-09 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs closed this revision. jroelofs marked 7 inline comments as done. jroelofs added a comment. Thanks for the review! https://github.com/llvm/llvm-project/commit/1e0669bfe05f0f48ee88152c4a1d581f484f8d67 Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-susp

[PATCH] D74669: [clang-tidy] New check: bugprone-suspicious-include

2020-03-09 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs updated this revision to Diff 249223. jroelofs added a comment. Implement review feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74669/new/ https://reviews.llvm.org/D74669 Files: clang-tools-extra/clang-tidy/bugprone/BugproneTid

[PATCH] D74669: [clang-tidy] New check: bugprone-suspicious-include

2020-03-09 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs updated this revision to Diff 249224. jroelofs added a comment. Add missing release notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74669/new/ https://reviews.llvm.org/D74669 Files: clang-tools-extra/clang-tidy/bugprone/BugproneTid

[PATCH] D74669: [clang-tidy] New check: bugprone-suspicious-include

2020-03-09 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs marked 6 inline comments as done. jroelofs added a comment. https://github.com/llvm/llvm-project/commit/52bbdad7d63fd060d102b3591b433d116a982255 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74669/new/ https://reviews.llvm.org/D74669 __

[PATCH] D74669: [clang-tidy] New check: bugprone-suspicious-include

2020-03-10 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs updated this revision to Diff 249377. jroelofs added a comment. Don't fire on `#import`s. The error on Windows suggests it would normally do the "right" thing anyway: http://45.33.8.238/win/10088/step_8.txt C:\src\llvm-project\out\gn\obj\clang-tools-extra\test\clang-tidy\checkers\Ou

[PATCH] D74669: [clang-tidy] New check: bugprone-suspicious-include

2020-03-12 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. re-landed in https://github.com/llvm/llvm-project/commit/2c9cf9f4ddd01ae9eb47522266a6343104f9d0b5 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74669/new/ https://reviews.llvm.org/D74669 ___

[PATCH] D74669: [clang-tidy] New check: misc-no-include-cpp

2020-02-15 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs created this revision. jroelofs added a reviewer: aaron.ballman. Herald added subscribers: cfe-commits, kbarton, xazax.hun, mgorny, nemanjai. Herald added a project: clang. Detects and fixes suspicious code like: `#include "foo.cpp"`. Inspired by: https://twitter.com/lefticus/sta

[PATCH] D74669: [clang-tidy] New check: misc-no-include-cpp

2020-02-16 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs marked an inline comment as done. jroelofs added a comment. In D74669#1878168 , @njames93 wrote: > I have a feeling this check should be called something along the lines of > bugprone-suspicous-include. That's a much better name, I like it.

[PATCH] D74669: [clang-tidy] New check: misc-no-include-cpp

2020-02-16 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs marked 4 inline comments as done and an inline comment as not done. jroelofs added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/NoIncludeCPPCheck.cpp:62 + Check.diag(HashLoc, "suspicious #include") + << FixItHint::CreateReplacement(Filenam

[PATCH] D74669: [clang-tidy] New check: misc-no-include-cpp

2020-02-16 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs updated this revision to Diff 244883. jroelofs marked an inline comment as done. jroelofs added a comment. - Renamed to bugprone-suspicious-include - Removed FixIts in favor of `note:` suggestions, iff the suggested file exists on the header search path. - Removed unnecessary unused para

[PATCH] D74669: [clang-tidy] New check: misc-no-include-cpp

2020-02-16 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs marked an inline comment as done. jroelofs added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SuspiciousIncludeCheck.h:26 +/// For the user-facing documentation see: +/// http://clang.llvm.org/extra/clang-tidy/checks/bugprone-suspicious-include.htm

[PATCH] D74669: [clang-tidy] New check: misc-no-include-cpp

2020-02-16 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs updated this revision to Diff 244884. jroelofs added a comment. git format-patch CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74669/new/ https://reviews.llvm.org/D74669 Files: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp clang-tools-extra/clang-tidy/bugpro

[PATCH] D74669: [clang-tidy] New check: misc-no-include-cpp

2020-02-16 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs marked an inline comment as done. jroelofs added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SuspiciousIncludeCheck.cpp:59 +Optional File = PP->LookupFile( +HashLoc /* FIXME: lies */, (FileName + RE).str(), IsAngled, nullptr, +

[PATCH] D74669: [clang-tidy] New check: misc-no-include-cpp

2020-02-17 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs updated this revision to Diff 244994. jroelofs added a comment. Implement review feedback re: DiagLoc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74669/new/ https://reviews.llvm.org/D74669 Files: clang-tools-extra/clang-tidy/bugprone/

[PATCH] D74669: [clang-tidy] New check: misc-no-include-cpp

2020-02-17 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs marked an inline comment as done. jroelofs added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SuspiciousIncludeCheck.cpp:59 +Optional File = PP->LookupFile( +HashLoc /* FIXME: lies */, (FileName + RE).str(), IsAngled, nullptr, +

[PATCH] D74669: [clang-tidy] New check: misc-no-include-cpp

2020-02-17 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs updated this revision to Diff 245031. jroelofs added a comment. Make the diagnostics more accurate. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74669/new/ https://reviews.llvm.org/D74669 Files: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp clang-tools-extr

[PATCH] D74812: [Sema] Teach -Warm-interrupt-safety about func ptrs

2020-02-18 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs created this revision. jroelofs added reviewers: efriedma, weimingz, EricWF. Herald added subscribers: cfe-commits, kristof.beyls. Herald added a project: clang. Fixes: https://bugs.llvm.org/show_bug.cgi?id=35527 https://bugs.llvm.org/show_bug.cgi?id=35528 Repository: rG LLVM Git

[PATCH] D74812: [Sema] Teach -Warm-interrupt-safety about func ptrs

2020-02-18 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs marked an inline comment as done. jroelofs added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:5931 + if (Caller->hasAttr()) { +const Decl *CalleeDecl = FDecl; +if (const auto *UO = dyn_cast(Fn->IgnoreParens())) { This fee

[PATCH] D28820: Warn when calling a non interrupt function from an interrupt on ARM

2020-02-20 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. Herald added a subscriber: kristof.beyls. In D28820#945118 , @kc.austin2017 wrote: > In D28820#944865 , @jroelofs wrote: > > > https://bugs.llvm.org/show_bug.cgi?id=35527 > > > > https://bugs

[PATCH] D73904: [clang] stop baremetal driver to append .a to lib

2020-02-03 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. +1, looks good with a test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73904/new/ https://reviews.llvm.org/D73904 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

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

2017-12-16 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. I'd much rather provide no implementation than one that lies. Broken builds are much safer than problems at runtime. Repository: rCXX libc++ https://reviews.llvm.org/D41316 ___ cfe-commits mailing list cfe-commits@lists

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

2017-12-16 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. I say that because there are contexts where it is **absolutely critical** that https://xkcd.com/221/ not be the implementation of an RNG. Repository: rCXX libc++ https://reviews.llvm.org/D41316 ___ cfe-commits mailing l

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

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

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

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

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

2018-01-11 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. > Should we go with current patch? You'll need a bunch of `UNSUPPORTED: has-no-random-device` or something like it, but other than that, I'm happy with the patch as-is. Repository: rCXX libc++ https://reviews.llvm.org/D41316 _

[PATCH] D43159: Modernize: Use nullptr more.

2018-02-11 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. Is it worth adding `-Werror=zero-as-null-pointer-constant` to the build? Repository: rCXX libc++ https://reviews.llvm.org/D43159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailm

[PATCH] D42645: New simple Checker for mmap calls

2018-01-29 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added inline comments. Comment at: lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp:1 +// MmapWriteExecChecker.cpp - Check for the prot argument +// Needs one of these at the top: ``` //===- MmapWriteExecChecker.cpp - Check the mmap prot argument -

[PATCH] D42645: New simple Checker for mmap calls

2018-01-29 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added inline comments. Comment at: lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp:1 +// MmapWriteExecChecker.cpp - Check for the prot argument +// jroelofs wrote: > Needs one of these at the top: > > ``` > //===- MmapWriteExecChecker.cpp - Check t

[PATCH] D42645: New simple Checker for mmap calls

2018-02-05 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added inline comments. Comment at: include/clang/StaticAnalyzer/Checkers/Checkers.td:399 + def MmapWriteExecChecker : Checker<"MmapWriteExec">, +HelpText<"Check if mmap() call is not both writable and executable">, +DescFile<"MmapWriteExecChecker.cpp">;

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

2018-04-06 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a subscriber: efriedma. jroelofs added a comment. > the targets where you would want to use this can't run the libcxx testsuite anyway (because they don't have an operating system to run the test programs under). I used to run libcxx tests for an arm baremetal toolchain I was bu

[PATCH] D30340: [libunwind] Disable calls to fprintf when building for baremetal targets in release mode

2017-02-24 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs accepted this revision. jroelofs added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D30340 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D30339: [libcxxabi] Disable calls to fprintf when building for baremetal targets in release mode

2017-02-24 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs accepted this revision. jroelofs added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D30339 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D30339: [libcxxabi] Disable calls to fprintf when building for baremetal targets in release mode

2017-02-24 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. In https://reviews.llvm.org/D30339#685888, @EricWF wrote: > isn't this incorrect because `config.h` always defines LIBCXX_BAREMETAL? Oh, right, it needs to be: #if !LIBCXXABI_BAREMETAL || !defined(NDEBUG) Repository: rL LLVM https://reviews.llvm.org/D30339 _

[PATCH] D30339: [libcxxabi] Disable calls to fprintf when building for baremetal targets in release mode

2017-02-24 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. In https://reviews.llvm.org/D30339#685919, @rmaprath wrote: > Perhaps change `config.h` and remove the definition there and adjust other > places accordingly? > > The current form is very easy to trip over. Eric's point is that LIBCXXABI_BAREMETAL is a 0/1 flag, not a

[PATCH] D30214: [Driver] Search for libc++ headers in ResourceDir

2017-03-01 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. libc++ headers should not be installed in the resource dir. https://reviews.llvm.org/D30214 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30158: [clang-tidy] modernize: Find usage of random_shuffle and replace it with shuffle.

2017-03-01 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. In https://reviews.llvm.org/D30158#690032, @madsravn wrote: > Looks good for the two tests the are for `random_shuffle` in llvm libc++. There were a lot more some time ago, before @mclow.lists performed this transformation on libc++'s testsuite. You might want to try

[PATCH] D30514: [libc++abi] Update new/delete definitions to match libc++

2017-03-02 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. In https://reviews.llvm.org/D30514#690318, @mehdi_amini wrote: > LGTM. > > (It seems that having libc++ and libc++abi in the same repo would help > sharing code like this) I think it would be a step backwards in terms of opening things up for layering violations. We

[PATCH] D30214: [Driver] Search for libc++ headers in ResourceDir

2017-03-02 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. In https://reviews.llvm.org/D30214#690375, @Hahnfeld wrote: > In https://reviews.llvm.org/D30214#690010, @jroelofs wrote: > > > libc++ headers should not be installed in the resource dir. > > > They are currently not by default. But with https://reviews.llvm.org/D30015

[PATCH] D30599: [ubsan] Extend the nonnull argument check to ObjC

2017-03-03 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. Can the null check be performed in the callee? That'd make this check work for a few more cases that this patch doesn't cover: - `performSelector:` messages - messages to `id`. https://reviews.llvm.org/D30599 ___ cfe-comm

[PATCH] D30599: [ubsan] Extend the nonnull argument check to ObjC

2017-03-03 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs accepted this revision. jroelofs added a comment. This revision is now accepted and ready to land. LGTM, by the way. https://reviews.llvm.org/D30599 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailm

[PATCH] D30423: [ubsan] Detect UB loads from bitfields

2017-03-06 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. I think this might miss loads from bitfield ivars. Also, what about the conversion that happens for properties whose backing ivar is a bitfield? (or does that happen in the runtime? can't remember) Comment at: test/CodeGenObjC/ubsan-bool.m:25 + // O

[PATCH] D30423: [ubsan] Detect UB loads from bitfields

2017-03-07 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs accepted this revision. jroelofs added a comment. This revision is now accepted and ready to land. LGTM Comment at: test/CodeGenObjC/ubsan-bool.m:26 + // OBJC: [[ICMP:%.*]] = icmp ule i8 [[ASHR]], 1, !nosanitize + // OBJC: call void @__ubsan_handle_load_invalid_valu

[PATCH] D28820: Warn when calling a non interrupt function from an interrupt on ARM

2017-03-08 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. In https://reviews.llvm.org/D28820#695356, @tyomitch wrote: > When compiling for softfp targets, this new warning doesn't make sense: there > are no VFP registers to save. > Jonathan, would you please conditionalize it to only affect hardfp targets? Sure, I can do th

[PATCH] D30762: [ubsan] Add a nullability sanitizer

2017-03-09 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:1911 +if (auto Nullability = Ty->getNullability(getContext())) { + if (Nullability && *Nullability == NullabilityKind::NonNull) { +SanitizerScope SanScope(this); aprantl wrote: >

[PATCH] D30733: [Driver] Add arch-specific rpath for libc++

2017-03-09 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs requested changes to this revision. jroelofs added a comment. This revision now requires changes to proceed. As I said on https://reviews.llvm.org/D30214, it is inappropriate to be installing libc++ in the resource directory... please **do not** do that. https://reviews.llvm.org/D30733

[PATCH] D30733: [Driver] Add arch-specific rpath for libc++

2017-03-10 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. In https://reviews.llvm.org/D30733#697313, @Hahnfeld wrote: > In https://reviews.llvm.org/D30733#697108, @jroelofs wrote: > > > As I said on https://reviews.llvm.org/D30214, it is inappropriate to be > > installing libc++ in the resource directory... please **do not** d

[PATCH] D30733: [Driver] Add arch-specific rpath for libc++

2017-03-10 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. I'll also add that we had a BOF at EuroLLVM 2014, where this got support from the community and people generally thought it was a good plan... Just needed someone to follow through with it. We (wearing my CodeSourcery hat) said we would do so, but have been making slow

[PATCH] D30158: [clang-tidy] modernize: Find usage of random_shuffle and replace it with shuffle.

2017-03-13 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. In https://reviews.llvm.org/D30158#699132, @madsravn wrote: > In https://reviews.llvm.org/D30158#698871, @aaron.ballman wrote: > > > In https://reviews.llvm.org/D30158#696534, @madsravn wrote: > > > > > Any updates on this? > > > > > > Have you run it over the test suite

[PATCH] D30945: Fix mis-spelled enum

2017-03-14 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs created this revision. https://reviews.llvm.org/D30945 Files: include/clang/Parse/Parser.h lib/Parse/ParseOpenMP.cpp lib/Parse/ParseStmt.cpp Index: lib/Parse/ParseStmt.cpp === --- lib/Parse/ParseStmt.cpp +++ lib/Pars

[PATCH] D30945: Fix mis-spelled enum

2017-03-14 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs closed this revision. jroelofs added a comment. r297756 https://reviews.llvm.org/D30945 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29818: [libcxx] Threading support: Attempt to externalize system_clock::now() and steady_clock::now() implementations

2017-03-14 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. In https://reviews.llvm.org/D29818#700949, @ed wrote: > Worth mentioning: the latest version of macOS now supports `clock_gettime()`. > Maybe better to leave the code as is and simply axe the Mach time code at > some point in the future? Supporting only the latest an

[PATCH] D30158: [clang-tidy] modernize: Find usage of random_shuffle and replace it with shuffle.

2017-03-16 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. In https://reviews.llvm.org/D30158#702760, @madsravn wrote: > In https://reviews.llvm.org/D30158#699342, @jroelofs wrote: > > > In https://reviews.llvm.org/D30158#699132, @madsravn wrote: > > > > > In https://reviews.llvm.org/D30158#698871, @aaron.ballman wrote: > > > >

[PATCH] D31140: [LLVMbugs] [Bug 18710] Only generate .ARM.exidx and .ARM.extab when needed in EHABI

2017-03-21 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. Can you clarify the logic here? It's my understanding that: `-fno-exceptions` does *not* imply `-fno-unwind-tables` however: `-fno-unwind-tables` *does* imply that exceptions cannot be used on targets that require the tables to do unwinding. https://reviews.llvm.org

[PATCH] D31375: Add docs for libunwind

2017-03-26 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs created this revision. Herald added a subscriber: mgorny. I'm still iffy about the build goop for this. I started mostly cargo-culting the stuff from libcxx, but couldn't get that to work. What's in the patch seems to work for the standalone build, but does not work for in tree builds (

[PATCH] D31375: Add docs for libunwind

2017-03-26 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs updated this revision to Diff 93074. https://reviews.llvm.org/D31375 Files: CMakeLists.txt docs/BuildingLibunwind.rst docs/CMakeLists.txt docs/README.txt docs/conf.py docs/index.rst Index: docs/index.rst === ---

[PATCH] D31375: Add docs for libunwind

2017-03-26 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. In https://reviews.llvm.org/D31375#710891, @compnerd wrote: > What happens when you try building it in tree? The docs-libunwind-html target is missing, and the docs don't get built. Comment at: docs/index.rst:82 + +If you want to contribute a patch

[PATCH] D31375: Add docs for libunwind

2017-03-26 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs updated this revision to Diff 93075. https://reviews.llvm.org/D31375 Files: CMakeLists.txt docs/BuildingLibunwind.rst docs/CMakeLists.txt docs/README.txt docs/conf.py docs/index.rst Index: docs/index.rst === ---

[PATCH] D61040: [Fuchsia] Support multilib for -fsanitize=address and -fno-exceptions

2019-04-23 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.h:122 + +/// \p Flag must be a flag accepted by the driver with its leading '-' removed, +// otherwise '-print-multi-lib' will not emit them correctly. Can we enforce this prec

[PATCH] D52153: scan-build: Add support of the option --exclude like in scan-build-py

2018-09-16 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs accepted this revision. jroelofs added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D52153 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D52151: Also manages clang-X as tool for scan-build

2018-09-16 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. `$triple-clang`, also Repository: rC Clang https://reviews.llvm.org/D52151 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52530: [analyzer] scan-build: if --status-bugs is passed, don't forget about the exit status of the actual build

2018-09-26 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs accepted this revision. jroelofs added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D52530 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D28820: Warn when calling a non interrupt function from an interrupt on ARM

2017-01-18 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. In https://reviews.llvm.org/D28820#649384, @rengolin wrote: > Seems like a very specific corner case on ARM, but is that attribute > guaranteed to be ARM-only? > > If so, LGTM as is. If not, avoid mentioning "VFP" on the error message. Yeah, the attribute is parsed in

[PATCH] D28820: Warn when calling a non interrupt function from an interrupt on ARM

2017-01-18 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs closed this revision. jroelofs added a comment. r292375 https://reviews.llvm.org/D28820 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28820: Warn when calling a non interrupt function from an interrupt on ARM

2017-01-18 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. In https://reviews.llvm.org/D28820#649726, @efriedma wrote: > Why can't the compiler handle this case itself transparently? According to > your description, the interrupt calling convention is different from the > normal hard-float AAPCS calling convention: the VFP re

[PATCH] D28820: Warn when calling a non interrupt function from an interrupt on ARM

2017-01-18 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. In https://reviews.llvm.org/D28820#649738, @jroelofs wrote: > In https://reviews.llvm.org/D28820#649726, @efriedma wrote: > > > Why can't the compiler handle this case itself transparently? According to > > your description, the interrupt calling convention is differen

[PATCH] D28820: Warn when calling a non interrupt function from an interrupt on ARM

2017-01-18 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. In https://reviews.llvm.org/D28820#649770, @efriedma wrote: > > There would be a big performance penalty for ISRs with callees that don't > > use VFP regs. > > Sacrificing correctness for the sake of performance seems like a bad idea... I don't quite see it that way,

[PATCH] D29817: [AVR] Fix __AVR_xxx macro definitions

2017-02-10 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs accepted this revision. jroelofs added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D29817 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D29827: [AVR] Add -mmcu option to the driver

2017-02-10 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added inline comments. Comment at: include/clang/Driver/Options.td:1613 def mcpu_EQ : Joined<["-"], "mcpu=">, Group; +def mmcu_EQ : Joined<["-"], "mmcu=">, Group; def mdynamic_no_pic : Joined<["-"], "mdynamic-no-pic">, Group; Would it make sense to hav

[PATCH] D38679: [libunwind] Support dwarf unwinding on i386 windows

2017-10-09 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added inline comments. Comment at: src/AddressSpace.hpp:521 unw_word_t *offset) { -#ifndef _LIBUNWIND_IS_BAREMETAL +#if !defined(_LIBUNWIND_IS_BAREMETAL) && !defined(_WIN32) Dl_info dyldInfo; Would it w

[PATCH] D38679: [libunwind] Support dwarf unwinding on i386 windows

2017-10-09 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added inline comments. Comment at: src/AddressSpace.hpp:521 unw_word_t *offset) { -#ifndef _LIBUNWIND_IS_BAREMETAL +#if !defined(_LIBUNWIND_IS_BAREMETAL) && !defined(_WIN32) Dl_info dyldInfo; mstorsjo w

[PATCH] D38599: Remove warnings for dynamic_cast fallback.

2017-10-09 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs resigned from this revision. jroelofs added a comment. I'm not sure I'm the right person to review this. Repository: rL LLVM https://reviews.llvm.org/D38599 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D38711: typos in documentation?

2017-10-09 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs accepted this revision. jroelofs added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D38711 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D38599: Remove warnings for dynamic_cast fallback.

2017-10-10 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. That reminds me... this does need a testcase or two. Repository: rL LLVM https://reviews.llvm.org/D38599 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D38599: Remove warnings for dynamic_cast fallback.

2017-10-10 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. In https://reviews.llvm.org/D38599#893985, @danalbert wrote: > In https://reviews.llvm.org/D38599#893903, @jroelofs wrote: > > > That reminds me... this does need a testcase or two. > > > Oh, also, any test I add is going to fail, since the case I'm trying to > account

[PATCH] D38599: Remove warnings for dynamic_cast fallback.

2017-10-10 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. In https://reviews.llvm.org/D38599#893990, @jroelofs wrote: > In https://reviews.llvm.org/D38599#893985, @danalbert wrote: > > > In https://reviews.llvm.org/D38599#893903, @jroelofs wrote: > > > > > That reminds me... this does need a testcase or two. > > > > > > Oh, als

[PATCH] D38679: [libunwind] Support dwarf unwinding on i386 windows

2017-10-11 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs accepted this revision. jroelofs added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D38679 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D38599: Remove warnings for dynamic_cast fallback.

2017-10-11 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. Needs a docs entry for the new flag (in libcxx's BuildingLibcxx.rst). Other than that, all the stuff I've asked you to add LGTM. I'd still appreciate @EricWF/@mclow's opinion on the meat of the functional change part of this though... I don't know all the implications

[PATCH] D35038: [libunwind] Add a test harness

2017-07-05 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs created this revision. Herald added a subscriber: mgorny. Mostly cargo-culted from libcxxabi, since the unwinder was forked from there in the first place. Might still be some cruft that's only applicable to libcxxabi in here, so let me know if you spot anything like that. I killed some

[PATCH] D35038: [libunwind] Add a test harness

2017-07-06 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs closed this revision. jroelofs added a comment. r307266 https://reviews.llvm.org/D35038 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   >