Yaxun (Sam) Liu
19d3b37196
Partially revert changes to test lang-std.cpp
...
Recover the checking for the default language standard for C++.
Reviewed by: Douglas Yung, Paul Robinson
2023-07-25 09:32:29 -04:00
Yaxun (Sam) Liu
8ef04488d1
Reland "[CUDA][HIP] Use the same default language std as C++""
...
Reland after fixing regression in lldb.
Differential Revision: https://reviews.llvm.org/D155539
2023-07-20 12:02:33 -04:00
Sylvestre Ledru
443f490b6a
Revert "[CUDA][HIP] Use the same default language std as C++"
...
This reverts commit 2d1d07152bd26b001dedec3400b4b01d3bb11622.
2023-07-20 10:54:54 +02:00
Yaxun (Sam) Liu
2d1d07152b
[CUDA][HIP] Use the same default language std as C++
...
Currently CUDA/HIP defines their own language standards in
LanguageStandards.def but they are redundant. They are the same as stdc++14.
The fact that CUDA/HIP uses c++* in option -std= indicates that they have the
same language standards as C++. The CUDA/HIP specific language features are
conveyed through language options, not language standards features. It makes
sense to let CUDA/HIP uses the same default language standard as C++.
Reviewed by: Siu Chi Chan, Artem Belevich
Differential Revision: https://reviews.llvm.org/D155539
Fixes: SWDEV-407685
2023-07-19 23:54:58 -04:00
Paul Robinson
aa149687dc
[PS4/PS5] Canonicalize tests to use 'target=.*-(ps4|ps5)'
...
This allows grepping for ps4 or ps5 to continue to work.
2022-12-01 07:21:07 -08:00
Paul Robinson
dee009d3b5
[lit] UNSUPPORTED ps4/ps5 => target={{.*-ps(4|5)}}
...
Part of the project to eliminate special handling for triples in lit expressions.
2022-11-29 09:07:59 -08:00
Fangrui Song
3baadff896
[CMake] Remove CLANG_DEFAULT_STD_C/CLANG_DEFAULT_STD_CXX
...
When Clang is used as a cross compiler, it should respect the target
platform default. Defaulting to a configure-time CLANG_DEFAULT_STD_C/CLANG_DEFAULT_STD_CXX
does not make much sense.
When Clang is used as a single-platform compiler, we should use Clang
configuration file (https://discourse.llvm.org/t/configuration-files/42529
https://clang.llvm.org/docs/UsersManual.html#configuration-files ).
The Gentoo needs from D34365 has been satisfied by a configuration file.
Reviewed By: mgorny
Differential Revision: https://reviews.llvm.org/D133375
2022-10-16 13:15:44 -07:00
Fangrui Song
3e99b8d947
C++/ObjC++: switch to gnu++17 as the default standard
...
Clang's default C++ standard is now `gnu++17` instead of `gnu++14`:
https://discourse.llvm.org/t/c-objc-switch-to-gnu-17-as-the-default-standard/64360
* CUDA/HIP are unchanged: C++14 from D103221.
* Sony PS4/PS5 are unchanged: https://discourse.llvm.org/t/c-objc-switch-to-gnu-17-as-the-default-standard/64360/6
* lit feature `default-std-cxx` is added to keep CLANG_DEFAULT_STD_CXX=xxx tests working.
Whether the cmake variable should be retained is disccused in D133375.
Depends on D131464
Reviewed By: #clang-language-wg, aaron.ballman
Differential Revision: https://reviews.llvm.org/D131465
2022-09-08 08:22:04 +00:00
Nikita Popov
fd2475049e
Revert "C++/ObjC++: switch to gnu++17 as the default standard"
...
This reverts commit e321c8dd2cea8365045ed44ae1c3c00c6a977d2e.
This causes many failures in llvm-test-suite, for example:
/home/npopov/repos/llvm-test-suite/build-O3/tools/timeit --summary MultiSource/Applications/lambda-0.1.3/CMakeFiles/lambda.dir/token_stream.cc.o.time /home/npopov/repos/llvm-project/build/bin/clang++ -DNDEBUG -I/home/npopov/repos/llvm-test-suite/MultiSource/Applications/lambda-0.1.3 -O3 -w -Werror=date-time -MD -MT MultiSource/Applications/lambda-0.1.3/CMakeFiles/lambda.dir/token_stream.cc.o -MF MultiSource/Applications/lambda-0.1.3/CMakeFiles/lambda.dir/token_stream.cc.o.d -o MultiSource/Applications/lambda-0.1.3/CMakeFiles/lambda.dir/token_stream.cc.o -c /home/npopov/repos/llvm-test-suite/MultiSource/Applications/lambda-0.1.3/token_stream.cc
/home/npopov/repos/llvm-test-suite/MultiSource/Applications/lambda-0.1.3/token_stream.cc:192:2: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
register char chr;
^~~~~~~~~
2022-09-08 09:45:50 +02:00
Fangrui Song
e321c8dd2c
C++/ObjC++: switch to gnu++17 as the default standard
...
Clang's default C++ standard is now `gnu++17` instead of `gnu++14`:
https://discourse.llvm.org/t/c-objc-switch-to-gnu-17-as-the-default-dialect/64360
* CUDA/HIP are unchanged: C++14 from D103221.
* Sony PS4/PS5 are unchanged: https://discourse.llvm.org/t/c-objc-switch-to-gnu-17-as-the-default-dialect/64360/6
* lit feature `default-std-cxx` is added to keep CLANG_DEFAULT_STD_CXX=xxx tests working.
Whether the cmake variable should be retained is disccused in D133375.
Depends on D131464
Close https://github.com/llvm/llvm-project/issues/56946
Reviewed By: #clang-language-wg, aaron.ballman
Differential Revision: https://reviews.llvm.org/D131465
2022-09-07 14:17:52 -07:00