Skip to content

Conversation

@j-o
Copy link

@j-o j-o commented Mar 22, 2017

Clang has some problems correctly detecting these, giving false positives.

See http://stackoverflow.com/questions/33736678/returning-reference-to-local-temporary-object-on-pointer-dereferencing

Currently, this affects cppexpose::Variant<T>::value(const T & defaultValue = T()) where T is a pointer type. Returning the defaultValue pointer by-value is fine (as is copies the pointer value); however, Clang issues a "Returning address of local temporary object" warning.

@sbusch42 sbusch42 merged commit 754eda5 into cginternals:master Mar 22, 2017
@sbusch42 sbusch42 removed the ready label Mar 22, 2017
@j-o j-o deleted the disable_clang_warning branch March 28, 2017 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants