[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-29 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 157899. 0x8000- added a comment. Update the list of magic values ignored by default. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49114 Files: clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-29 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added inline comments. Comment at: clang-tidy/readability/MagicNumbersCheck.cpp:76-86 + IgnoredFloatingPointValues.reserve(IgnoredFloatingPointValuesInput.size()); + IgnoredDoublePointValues.reserve(IgnoredFloatingPointValuesInput.size()); + for (const auto :

[PATCH] D49967: [clangd] Add command-line option to suppress the space and the circular dot prepended in a completion label.

2018-07-29 Thread Raoul Wols via Phabricator via cfe-commits
rwols closed this revision. rwols added a comment. Oh... I should have used `arc land` instead of `svn commit`. Here's the commit: https://reviews.llvm.org/rCTE338223 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49967 ___

[clang-tools-extra] r338223 - [clangd] Add command-line option

2018-07-29 Thread Raoul Wols via cfe-commits
Author: rwols Date: Sun Jul 29 12:12:42 2018 New Revision: 338223 URL: http://llvm.org/viewvc/llvm-project?rev=338223=rev Log: [clangd] Add command-line option to suppress the space and the circular dot prepended in a completion label. Modified:

[PATCH] D49967: [clangd] Add command-line option to suppress the space and the circular dot prepended in a completion label.

2018-07-29 Thread Raoul Wols via Phabricator via cfe-commits
rwols updated this revision to Diff 157894. rwols added a comment. Avoid double negative for command line option Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49967 Files: clangd/tool/ClangdMain.cpp Index: clangd/tool/ClangdMain.cpp

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-29 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. > Based on this, I think the integer list should also include 2, 3, and 4 as > defaults -- those show up a lot more than I'd have expected. As for > floating-point values, 1.0 certainly jumps out at me, but none of the rest > seem particularly common. What do you

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D49114#1179652, @0x8000- wrote: > Top 40 magic numbers in https://github.com/qt/qtbase > > 4859 2 > 2901 3 > 1855 4 >985 5 >968 8 >605 6 >600 7 >439 16 >432 10 >363 >356 32 >241 1.0f >

[PATCH] D48098: clang-format-diff: Make it work with python3 too

2018-07-29 Thread Marco Falke via Phabricator via cfe-commits
MarcoFalke added a comment. In https://reviews.llvm.org/D48098#1174771, @krasimir wrote: > MarcoFalke: do you need someone to submit this for you? Yes, I'd appreciate any help on how to submit this for merge. https://reviews.llvm.org/D48098 ___

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-29 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added inline comments. Comment at: clang-tidy/readability/MagicNumbersCheck.cpp:76-86 + IgnoredFloatingPointValues.reserve(IgnoredFloatingPointValuesInput.size()); + IgnoredDoublePointValues.reserve(IgnoredFloatingPointValuesInput.size()); + for (const auto :

[PATCH] D49967: [clangd] Add command-line option to suppress the space and the circular dot prepended in a completion label.

2018-07-29 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Makes sense, thanks! Comment at: clangd/tool/ClangdMain.cpp:161 +static llvm::cl::opt NoHeaderInsertDecorators( +"no-header-insert-decorators", +

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-29 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added inline comments. Comment at: clang-tidy/readability/MagicNumbersCheck.cpp:76-86 + IgnoredFloatingPointValues.reserve(IgnoredFloatingPointValuesInput.size()); + IgnoredDoublePointValues.reserve(IgnoredFloatingPointValuesInput.size()); + for (const auto :

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-29 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. Top 40 magic numbers in https://github.com/qt/qtbase 4859 2 2901 3 1855 4 985 5 968 8 605 6 600 7 439 16 432 10 363 356 32 241 1.0f 217 12 209 255 207 100 205 9 205 20 204 50 177 0.5 174 15 162 0x2 144

[PATCH] D49967: [clangd] Add command-line option to suppress the space and the circular dot prepended in a completion label.

2018-07-29 Thread Raoul Wols via Phabricator via cfe-commits
rwols created this revision. rwols added reviewers: sammccall, ilya-biryukov, ioeric. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay. Some LSP clients (e.g. Sublime Text) assume that the label and the completion trigger have a common prefix. This assumption is broken by

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/readability/MagicNumbersCheck.cpp:76-86 + IgnoredFloatingPointValues.reserve(IgnoredFloatingPointValuesInput.size()); + IgnoredDoublePointValues.reserve(IgnoredFloatingPointValuesInput.size()); + for (const auto :

Re: r338049 - [OPENMP] What's new for OpenMP in clang.

2018-07-29 Thread Alexey Bataev via cfe-commits
Yes, that would be good Best regards, Alexey Bataev > 29 июля 2018 г., в 12:41, Jonas Hahnfeld via cfe-commits > написал(а): > > I just noticed that UsersManual says: "Clang supports all OpenMP 3.1 > directives and clauses." Maybe this should link to OpenMPSupport? > >> On 2018-07-26 19:53,

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-29 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 157889. 0x8000- added a comment. Add a flag to ignore all powers of two integral values. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49114 Files: clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-29 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added inline comments. Comment at: clang-tidy/readability/MagicNumbersCheck.cpp:76-86 + IgnoredFloatingPointValues.reserve(IgnoredFloatingPointValuesInput.size()); + IgnoredDoublePointValues.reserve(IgnoredFloatingPointValuesInput.size()); + for (const auto :

Re: r338049 - [OPENMP] What's new for OpenMP in clang.

2018-07-29 Thread Jonas Hahnfeld via cfe-commits
I just noticed that UsersManual says: "Clang supports all OpenMP 3.1 directives and clauses." Maybe this should link to OpenMPSupport? On 2018-07-26 19:53, Alexey Bataev via cfe-commits wrote: Author: abataev Date: Thu Jul 26 10:53:45 2018 New Revision: 338049 URL:

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-29 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added inline comments. Comment at: clang-tidy/readability/MagicNumbersCheck.cpp:76-86 + IgnoredFloatingPointValues.reserve(IgnoredFloatingPointValuesInput.size()); + IgnoredDoublePointValues.reserve(IgnoredFloatingPointValuesInput.size()); + for (const auto :

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-29 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added inline comments. Comment at: clang-tidy/readability/MagicNumbersCheck.cpp:76-86 + IgnoredFloatingPointValues.reserve(IgnoredFloatingPointValuesInput.size()); + IgnoredDoublePointValues.reserve(IgnoredFloatingPointValuesInput.size()); + for (const auto :

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-29 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added inline comments. Comment at: clang-tidy/readability/MagicNumbersCheck.cpp:57 +const char DefaultIgnoredIntegerValues[] = "0;1;"; +const char DefaultIgnoredFloatingPointValues[] = "0.0;"; + aaron.ballman wrote: > 0x8000- wrote: > >

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/readability/MagicNumbersCheck.cpp:57 +const char DefaultIgnoredIntegerValues[] = "0;1;"; +const char DefaultIgnoredFloatingPointValues[] = "0.0;"; + 0x8000- wrote: > aaron.ballman wrote: > >

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-29 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added inline comments. Comment at: clang-tidy/readability/MagicNumbersCheck.cpp:57 +const char DefaultIgnoredIntegerValues[] = "0;1;"; +const char DefaultIgnoredFloatingPointValues[] = "0.0;"; + aaron.ballman wrote: > 0x8000- wrote: > >

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/readability/MagicNumbersCheck.cpp:76-86 + IgnoredFloatingPointValues.reserve(IgnoredFloatingPointValuesInput.size()); + IgnoredDoublePointValues.reserve(IgnoredFloatingPointValuesInput.size()); + for (const auto :

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-29 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- marked 2 inline comments as done. 0x8000- added inline comments. Comment at: clang-tidy/readability/MagicNumbersCheck.cpp:76-86 + IgnoredFloatingPointValues.reserve(IgnoredFloatingPointValuesInput.size()); +

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/readability/MagicNumbersCheck.cpp:57 +const char DefaultIgnoredIntegerValues[] = "0;1;"; +const char DefaultIgnoredFloatingPointValues[] = "0.0;"; + 0x8000- wrote: > aaron.ballman wrote: > > I would

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-29 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- marked 4 inline comments as done. 0x8000- added a comment. See inline comments. Basically we need two arrays because APFloats of different semantics don't compare well, and even if we coerce them, they sometimes are not equal. Comment at:

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-29 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 157886. 0x8000- added a comment. Indicate that `0` and `0.0` are accepted unconditionally (because it makes sense in the source code, and speeds-up many checks as 0s are very common and we don't want to spend log2(n) to find them at the beginning of

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for working on this, I think it's getting closer! I'd use a slightly different approach to handling floating-point values, but if that turns out to be a clean implementation we may want to think about whether there are improvements from modelling

[PATCH] D47154: Try to make builtin address space declarations not useless

2018-07-29 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm updated this revision to Diff 157885. arsenm added a comment. Remove old run line https://reviews.llvm.org/D47154 Files: include/clang/AST/ASTContext.h include/clang/Basic/BuiltinsAMDGPU.def include/clang/Basic/TargetInfo.h lib/AST/ASTContext.cpp lib/Basic/Targets/AMDGPU.h

[PATCH] D47154: Try to make builtin address space declarations not useless

2018-07-29 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: include/clang/Basic/TargetInfo.h:1157 + /// language address space. + virtual LangAS getCUDABuiltinAddressSpace(unsigned AS) const { +return getLangASFromTargetAS(AS); yaxunl wrote: > I think this function is not

[PATCH] D49289: [mips64][clang] Provide the signext attribute for i32 return values

2018-07-29 Thread Simon Atanasyan via Phabricator via cfe-commits
atanasyan accepted this revision. atanasyan added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D49289 ___ cfe-commits mailing list cfe-commits@lists.llvm.org