This website requires JavaScript.
Explore
Help
Sign In
feedc0de
/
qt-creator
Watch
1
Star
0
Fork
0
You've already forked qt-creator
forked from
qt-creator/qt-creator
Code
Pull Requests
Activity
Files
103aa8be7cc57801ca083b5a53e34b51df36d3e3
qt-creator
/
tests
/
unit
/
unittest
/
data
/
diagnostic_diagnostic.cpp
9 lines
50 B
C++
Raw
Normal View
History
Unescape
Escape
Clang: Tests: Use test data working with clang 3.6 *and* clang 3.8 The test data produces different results when it is run with libclang 3.6 and libclang 3.8. (lib)clang 3.8 will generate an error instead of a warning and suppress further diagnostics. See below. Use simpler test data that is agnostic to the different clang versions. $ cat input.cpp class X { X(X&&) noexcept; }; X::X(X&&) = default; int function() { } $ clang++-3.6 -fsyntax-only -std=c++11 input.cpp input.cpp:5:4: warning: 'X' is missing exception specification 'noexcept' X::X(X&&) = default; ^ noexcept input.cpp:2:5: note: previous declaration is here X(X&&) noexcept; ^ input.cpp:9:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ 2 warnings generated. $ clang++-3.8 -fsyntax-only -std=c++11 input.cpp input.cpp:5:4: error: 'X' is missing exception specification 'noexcept' X::X(X&&) = default; ^ noexcept input.cpp:2:5: note: previous declaration is here X(X&&) noexcept; ^ 1 error generated. Change-Id: I6d786a8b87eb4438fa8db36540db9358181b9a5b Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-06-21 15:43:08 +02:00
int
noReturnValue
(
)
Clang: Add diagnostics Diagnostics are now moved to the clang backend process. Fixits are supported too. Change-Id: I20faacf466bbf78dec479220c3d7b336a47bc453 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-08-31 16:28:26 +02:00
{
}
Clang: Tests: Use test data working with clang 3.6 *and* clang 3.8 The test data produces different results when it is run with libclang 3.6 and libclang 3.8. (lib)clang 3.8 will generate an error instead of a warning and suppress further diagnostics. See below. Use simpler test data that is agnostic to the different clang versions. $ cat input.cpp class X { X(X&&) noexcept; }; X::X(X&&) = default; int function() { } $ clang++-3.6 -fsyntax-only -std=c++11 input.cpp input.cpp:5:4: warning: 'X' is missing exception specification 'noexcept' X::X(X&&) = default; ^ noexcept input.cpp:2:5: note: previous declaration is here X(X&&) noexcept; ^ input.cpp:9:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ 2 warnings generated. $ clang++-3.8 -fsyntax-only -std=c++11 input.cpp input.cpp:5:4: error: 'X' is missing exception specification 'noexcept' X::X(X&&) = default; ^ noexcept input.cpp:2:5: note: previous declaration is here X(X&&) noexcept; ^ 1 error generated. Change-Id: I6d786a8b87eb4438fa8db36540db9358181b9a5b Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-06-21 15:43:08 +02:00
void
f
(
int
)
{
f
(
)
;
}
Copy Permalink