File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -227,6 +227,42 @@ But this will put the `inline` keyword in the wrong place resulting in:
227227Apparently one cannot use `:program: `clang-change-namespace ` to inline a
228228namespace.
229229
230+ Symbol references not updated
231+ -----------------------------
232+
233+ Consider this `test.cc ` file:
234+
235+ .. code-block :: c++
236+
237+ namespace old {
238+ struct foo {};
239+ } // namespace old
240+
241+ namespace b {
242+ old::foo g_foo;
243+ } // namespace b
244+
245+ Notice that namespace `b ` defines a global variable of type `old::foo `. If we
246+ now change the name of the `old ` namespace to `modern `, the reference will not
247+ be updated:
248+
249+ .. code-block :: console
250+
251+ clang-change-namespace --old_namespace 'old' --new_namespace 'modern' --file_pattern test.cc test.cc
252+
253+ .. code-block :: c++
254+
255+ namespace modern {
256+ struct foo {};
257+ } // namespace modern
258+
259+ namespace b {
260+ old::foo g_foo;
261+ } // namespace b
262+
263+ `g_foo ` is still of the no longer existing type `old::foo ` while instead it
264+ should use `modern::foo `.
265+
230266
231267:program: `clang-change-namespace ` Command Line Options
232268======================================================
You can’t perform that action at this time.
0 commit comments