StringSwitch cannot be copied (take 2).
This prevents StringSwitch from being used with 'auto', which is important because the inferred type is StringSwitch rather than the result type. This is a problem because StringSwitch stores addresses of temporary values rather than copying or moving the value into its own storage. This is a compromise that still allows wrapping StringSwitch in other temporary structures, which (unlike StringSwitch) may be non-trivial to set up and therefore want to at least be movable. (For an example, see QueryParser.cpp in clang-tools-extra.) Changing this uncovered the bug in PassBuilder, also in this patch. Clang doesn't seem to have any occurrences of the issue. Re-commit of r276652. llvm-svn: 276671
Loading
Please sign in to comment